Need help with custom dialog box

I created a custom help dialog box. The problem is that 5 buttons do not properly fit in my manager of horizontal field on some blackberry devices. How can I make own? I tried to use my own custom buttons that allow me to specify their width and height, but I'm unable to get the width of the dialog box, so I can't determine how wide should be buttons.

import net.rim.device.api.ui.component.ButtonField;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.container.HorizontalFieldManager;

public class HelpDialog extends Dialog
{
    static int ButtonPressed;
    HorizontalFieldManager hfmChoices = new HorizontalFieldManager();
    ButtonField cmdFirst = new ButtonField("|<")
    {
        protected boolean navigationClick(int status, int time)
        {
            ButtonPressed = 0;
            close();
            return true;
        }
    };
    ButtonField cmdPrev = new ButtonField("<")
    {
        protected boolean navigationClick(int status, int time)
        {
            ButtonPressed = 1;
            close();
            return true;
        }
    };
    ButtonField cmdNext = new ButtonField(">")
    {
        protected boolean navigationClick(int status, int time)
        {
            ButtonPressed = 2;
            close();
            return true;
        }
    };
    ButtonField cmdLast = new ButtonField(">|")
    {
        protected boolean navigationClick(int status, int time)
        {
            ButtonPressed = 3;
            close();
            return true;
        }
    };
    ButtonField cmdClose = new ButtonField("Close")
    {
        protected boolean navigationClick(int status, int time)
        {
            close();
            return true;
        }
    };

    public HelpDialog(String message, int page, int maxPages)
    {
        super("Help (Page: " + page + " of " + maxPages + ")\n\n" + message + "\n", null, null, -1, null, 0);
        ButtonPressed = -1;
        if (page <= 1)
        {
            cmdFirst.setEnabled(false);
            cmdPrev.setEnabled(false);
        }
        if (page >= maxPages)
        {
            cmdNext.setEnabled(false);
            cmdLast.setEnabled(false);
        }
        hfmChoices.add(cmdFirst);
        hfmChoices.add(cmdPrev);
        hfmChoices.add(cmdNext);
        hfmChoices.add(cmdLast);
        hfmChoices.add(cmdClose);
        add(hfmChoices);
    }
}

Thank you

Most people have no need a close button, they expect the ESC to do it for them.

That said, I disagree with this statement:

"I think that the only good way to use managers other than the AbsoluteFieldManager, is to use them at all."

Designing a user experience that works well on multiple devices is difficult, and I don't think that has a size fits all approach work.  In addition, I don't have the time to create formats for specific screens for each device type, and although this will not happen now, I didn't have to rework screen designs every time that a new device came out.  I think that it is possible to create a common user interface experience given the size of the screen, and whether it is touch.  If you want to read my thoughts on this, have a look at the tutorial of the user interface you will find here:

http://supportforums.BlackBerry.com/T5/Java-development/tutorials-for-new-developers-part-1/m-p/1621...

Tags: BlackBerry Developers

Similar Questions

  • Problem with custom dialog box

    I have a custom dialog box. The code goes here

    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.ui.decor.BackgroundFactory;
    
    public class CustomDialog extends Dialog{
    
        public CustomDialog(int command,String msg,int color,int alpha){
             super(command, msg, command,Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), VerticalFieldManager.FOCUSABLE);
             setBackground (BackgroundFactory.createSolidTransparentBackground (color, alpha));
        }
    
    }
    

    I'm the caller to another class as follows

    CustomDialog d = new CustomDialog(Utils.D_YES_NO,"Do you want to exit",Color.BLUE,140);
    d.show();
    

    Its display very well and as I intended it to be. But the problem is that I'm not able to get the index of the choice to perform certain actions, such as

        int i=d.getSelectedValue();
    
                        if(i==Dialog.D_YES){
                            Dialog.alert("hi");
                        }
    
                        }
    

    Its do not call the dialog box, can anyone suggest me how to get the index of the choice that I chose to say YES or NO and to perform tasks accordingly

    Plese try suite

    CustomDialog d = new CustomDialog(Dialog.D_YES_NO,"Do you want to exit",Color.BLUE,140);
                    d.show();
                    d.setDialogClosedListener(new DialogClosedListener() {
    
                        public void dialogClosed(Dialog dialog, int choice) {
                            /*
                             *   // Field descriptor #211 I
                                  public static final int YES = 4;
    
                                  // Field descriptor #211 I
                                  public static final int NO = -1;
                             */
                            int i=choice;
                            System.out.print("Selected Value :"+choice);
                            if(Dialog.YES==choice){
                                System.out.println("Selected Value : YES");
                            }else if(Dialog.NO==choice){
                                System.out.println("Selected Value: NO");
                            }
    
                        }
                    });
    

    If it is useful, please make as response and do not hesitate on LIKE button thanks

  • Need help with custom script to rename the layers

    Hello world.

    I need help to write a custom script (because I suck at it) that will allow me to go through all the layers and sous-calques for a specific name ('X') and give it a new specific name ('Y').

    I have had success using the script below, but it does not work on any text layers names where the text layer was previously particularly well-known in 'X' and now changed needs.

    Any help is greatly appreciated.

    * Note: this script was originally used to find any layer with 'Copy' in its name and remove with anything after (to correct the problem of duplication of layers by adding this text).

    This is why the function is named removeCopy. It works for renaming layers also - just not a layer of text unfortunately.

    #target illustrator

    function removeCopy() {}
    If (app.documents.length == 0) return;
    var app.activeDocument = docRef;
    recurseLayers (docRef.layers);
    }
    removeCopy();
    function recurseLayers (objArray) {}
    for (var i = 0; i < objArray.length; i ++) {}
    ObjArr [i] .name = ObjArr [i].name.replace (/ \s*current name\s*\d*/, 'new name');
    If (objArray [i] .layers) recurseLayers (. layers.length > 0 ObjArr [i]);
    }
    }

    I finally found something after searching forums for a week. My confusion was related to the way Illustrator treats real layers against text/path/object "layers." Instead of layers, I had to use the pageItems in the script. The code below works. Thanks to Gustavo for his answer in another thread and Carlos I thank you for this looking too good! You're great to be ready to help models do more advanced things with Illustrator.

    var doc = app.activeDocument;
    var items = doc.pageItems;
    for (var g = 0; g)
        elements [g] .name = elements [g].name.replace ('Century Schoolbook text line', ' MonogramText: Century Schoolbook ");
    };
    App.Redraw ();
  • Need help with Custom Field Layout - getting wirer height value

    In the BB Simulator, I get a strange value placed in in my field layout() method custom. The width is 320, which is correct, but the height is 1073741823 and it takes 240 or less. In this test, my custom field is the only field in the Manager, so I expect to 240.

    I tried two different simulators - BB curve and the 8800. I use JDE 4.5.0 in Eclipse 3.4.1. This is the code for my method of layout:

    Protected Sub layout (int width, int height) {}
    s long = getStyle().
    If ((s & USE_ALL_WIDTH)! = USE_ALL_WIDTH) {}
    width = Math.min (width, getPreferredWidth());
    }
    If ((s & USE_ALL_HEIGHT)! = USE_ALL_HEIGHT) {}
    height = Math.min (height, getPreferredHeight());
    }
    setExtent (width, height);
    model.setExtent (width, height);
    Model.Scroll (0, 0);
    }

    I expect the value of the screen height, or less, if the domain is configured correctly.

    I'm upgrading my custom field in a VerticalField Manager with the following attributes:

    Super (VerticalFieldManager.USE_ALL_WIDTH
    | VerticalFieldManager.USE_ALL_HEIGHT
    | VerticalFieldManager.FIELD_HCENTER | VerticalFieldManager.FIELD_VCENTER);

    Is this a bug in the Simulator, or I understand the API correctly? Is there a way to 'reset' the Simulator - I tried to get out of Eclipse and restart Windows, but I always get the same value.

    Thank you!

    Mark

    A VerticalFieldManager comes, I think, with default VERTICAL_SCROLL.  If you do not want to scroll through this particular Manager, add VerticalFieldManager.NO_VERTICAL_SCROLL to your forests of style and it will be laid out with only the height and the actual width.

    Also, since you setExtent() by yourself, USE_ALL_HEIGHT and USE_ALL_WIDTH are redundant, I think.

    Hope that helps,

    Arkady.

  • Can someone help with this dialog box?

    I've set up a dialogue, but I don't know how to run properly...

    (1) I want the check box turn off the last 3 fields and make their value to be the same as the first field.

    (2) have the variables of the fields and selected radio to come to the alert

    #target illustrator
    
    //window
    var win = new Window('dialog', "My Dialog");
    this.windowRef = win;
    
    //panels
    win.fieldpanel = win.add("panel", undefined, "");
    win.radiopanel = win.add("panel", undefined, "");
    
    //panel orientation
    win.fieldpanel.orientation='row';
    win.radiopanel.orientation='row';
    
    //fieldpanel
    win.fieldpanel.panel1 = win.fieldpanel.add('panel', undefined, "Left");
    win.fieldpanel.panel2 = win.fieldpanel.add('panel', undefined, "Right");
    win.fieldpanel.panel3 = win.fieldpanel.add('panel', undefined, "Top");
    win.fieldpanel.panel4 = win.fieldpanel.add('panel', undefined, "Bottom");
    
    win.fieldpanel.panel1.left_input = win.fieldpanel.panel1.add('edittext', undefined, "0");
    win.fieldpanel.panel2.right_input = win.fieldpanel.panel2.add('edittext', undefined, "0");
    win.fieldpanel.panel3.top_input = win.fieldpanel.panel3.add('edittext', undefined, "0");
    win.fieldpanel.panel4.bottom_input = win.fieldpanel.panel4.add('edittext', undefined, "0");
    
    win.fieldpanel.panel1.left_input.characters = 5;
    win.fieldpanel.panel2.right_input.characters = 5;
    win.fieldpanel.panel3.top_input.characters = 5;
    win.fieldpanel.panel4.bottom_input.characters = 5;
    
    win.fieldpanel.check1 = win.fieldpanel.add('checkbox', undefined, "Equal"); 
    
    //radiopanel
    win.radiopanel.radio1 = win.radiopanel.add('radiobutton',undefined, "Option 1"); 
    win.radiopanel.radio2 = win.radiopanel.add('radiobutton',undefined, "Option 2"); 
    win.radiopanel.radio3 = win.radiopanel.add('radiobutton',undefined, "Option 3"); 
    
    //select first radio button
    win.radiopanel.radio1.value = true;
    
    //ok button
    win.okbutton = win.add('button',undefined, "Ok"); 
    
    //disable fields with checkbox and equal values
    win.fieldpanel.check1.onCLick = function() {
      if(win.fieldpanel.check1.value){
        var leftvalue = win.fieldpanel.left_input.text;
        win.fieldpanel.right_input.text = left;
        win.fieldpanel.top_input.text = left;
        win.fieldpanel.bottom_input.text = left;
    
        win.fieldpanel.right_input.enabled = false;
        win.fieldpanel.top_input.enabled = false;
        win.fieldpanel.bottom_input.enabled = false;
      } else {
        win.fieldpanel.right_input.enabled = true;
        win.fieldpanel.top_input.enabled = true;
        win.fieldpanel.bottom_input.enabled = true;
      }
    };
    
    //event listener for radio buttons
    win.radiopanel.radio1.onClick = win.radiopanel.radio2.onClick = win.radiopanel.radio3.onClick = function () {
      var selected = "";
      if(win.radiopanel.radio1.value) {
        selected = 1;
      }
      else if(win.radiopanel.radio2.value) {
        selected = 2;
      }
      else if(win.radiopanel.radio3.value) {
        selected = 3;
      }
    };
    
    //event listener for ok button
    win.okbutton.onClick = function(){
      var left = win.fieldpanel.left_input.text;
      var right = win.fieldpanel.right_input.text;
      var top = win.fieldpanel.top_input.text;
      var bottom = win.fieldpanel.bottom_input.text;
      if (selected = 1) {var option = "Option 1"};
      if (selected = 2) {var option = "Option 2"};
      if (selected = 3) {var option = "Option 3"};
    
      win.close();
      alert(left+", "+right+", "+top+", "+bottom+", "+option);
    };
    
    win.show()
    

    you have a number of syntax errors, except that it should work

    case sentive

    //disable fields with checkbox and equal values
    win.fieldpanel.check1.onCLick = function() { // misspelled

    in a lot of lines like below in pink you miss panel1 panel2, panel3, panel4

        var leftvalue = win.fieldpanel.left_input.text; // missing panel1

    left is undefined, it should be leftvalue

    Win.fieldpanel.right_input. Text = left; must be leftvalue

  • help with custom calculation / boxes

    Hello.

    I'm trying to link the boxes for a total of overall points as follows:

    Question1 [] yes [] no

    Question2 [] yes [] no

    1 point if either 'Yes' is selected. (Max 1 point only)

    Question3 [] yes [] no

    Question4 [] yes [] no

    2 points in total for each '' Yes. '' (Maximum 4 points)

    I set each box to a value of exports of 1.

    I have a score box "box2".

    // first section questions
    // set vars
    var points = this.getField("YesOne").value + this.getField("YesTwo").value;
    // if then
    if ((points > 0)) {this.getField("box2").value = 1} 
    else {this.getField("box2").value = 0};
    

    I got stuck on the first part, because it doesn't work as I said above, any help would be appreciated.

    I am trying to post the actual PDF, but I can't find a way to put it in this ad...

    Thank you!

    Here is an example with all 3 approaches and the display of the value of each field:

    Boxes amount

  • Need help with custom class main event to a class not related.

    Hey guys,.

    I am new to Flash and not very well with OOP.  I did it pretty far with google and hidden, but I was pulling my hair on this problem for a day and everything I try get an error or just simply don't touch the listener.

    I'm trying to get my main class to send an event customized to an unrelated class called BigIcon.  The rest of the code works fine, it's just the addEventListener and dispatchEvent method that does not work.

    I put in the codes below.  Let me know if something else is needed to solve the problems.  Thank you!

    Main.As

    package 
    {
        import flash.display.MovieClip;
        import flash.events.MouseEvent;
    
    
        public class Main extends MovieClip
        {
            var iconLayer_mc:MovieClip = new MovieClip();
    
            public function Main()
            {
                Spin_btn.addEventListener(MouseEvent.CLICK,fl_MouseClickHandler);
    
                addChildAt(iconLayer_mc,0);
                placeIcons();
            }
    
            function placeIcons():void
            {
                var i:int;
                var j:int;
    
                for (i = 0; i < 4; i++)
                {
                    for (j = 0; j < 5; j++)
                    {
                        //iconString_array has the names of illustrator objects that have been converted to MovieClips and are in the library.
                        var placedIcon_mc:BigIcon = new BigIcon(iconString_array[i][j],i,j);
                        iconLayer_mc.addChild(placedIcon_mc);
                    }
                }
            }
    
            function fl_MouseClickHandler(event:MouseEvent):void
            {
                dispatchEvent(new Event("twitchupEvent",true));
            }
        }
    }
    

    BigIcon.as

    package 
    {
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.utils.getDefinitionByName;
    
        public class BigIcon extends MovieClip
        {
            private var iconImage_str:String;
            private var iconRow_int:int;
            private var iconColumn_int:int;
    
            public function BigIcon(iconImage_arg:String, iconRow_arg:int, iconColumn_arg:int)
            {
                iconImage_str = iconImage_arg;
                iconRow_int = iconRow_arg;
                iconColumn_int = iconColumn_arg;
    
                this.addEventListener(Event.ADDED_TO_STAGE, Setup);
    
            }
    
            function Setup(e:Event)
            {
    
                this.y = iconRow_int;
                this.x = iconColumn_int;
    
                var ClassReference:Class = getDefinitionByName(iconImage_str) as Class;
                var thisIcon_mc:MovieClip = new ClassReference;
                this.addChild(thisIcon_mc);
    
                addEventListener("twitchupEvent", twitchUp);
            }
    
            function twitchUp(e:Event)
            {
                this.y +=  10;
            }
        }
    }
    

    This could be a bit abstract to understand, but think about what you assign event listeners to when you implement the.

    When you want to have a function to respond to a button that is clicked, what do you attribute the event listener to?  She is assigned to the object that generated the event, the button.

    In your case the main class generates the event.

    You could take a different route with this, where if all your BigIcon objects were stored in a table in the main class, you could loop through that array and manage your contractions without having to have every BigIcon object involved in this transformation.

  • Need help with custom roles

    Hello

    Ive been charged with leading a small project... Here's the scenario:

    We have 25 shared Lun connected to each host in a cluster. The LUNS are labeled & lt; The names of LUN & gt; _Windows or Linux.

    What I want to do a role where only the team the team of linux or windows only would see their LUNS and not other teams lun.

    Is it possible... ??

    Thank you in advance.

    Navigate to the folder create, click permissions and ADD to assign the role to the folder.

    You can use custom (expand all topics and select you want) role, and no (default) access

    If you have found this information useful, please consider awarding points to 'Correct' or 'Useful'*.

  • Need help with custom calculation Script

    Hey everybody.  I'm using Acrobat X Pro and stumbling a bit on the syntax of the following equation.  I need to add the value of "Cell1" & "Cell2" then add the value of "Cell3.  However, the value of "Cell3" is entered by the user and specifies a percentage of the sum of "Cell1 &"Cell2".  For example: If the user enters "3" in "Cell3" I need the value returned at 3% of the sum of "Cell1" + "Cell2".  If the user enters "9" in "Cell3" I need the value returned for "Cell3" 9% of the sum of "Cell1 and Cell2" and the end result should be the sum of "Cell1 Cell2 + Cell3.  In more detail:

    If "Cell1" = "Cell2" $ 500 = $500 and "Cell3" = '3' then I need the returned value to be $1030,00.

    I hope this makes sense. Here's what I have so far, but alas, it does not work.  Any help would be GREATLY appreciated.

    Get the first value in the field, as a number

    var v1 = + getField("Cell1").value;

    Get the second field value, as a number

    var v2 = + getField("Cell2").value;

    Get the value of a field, a number transformation

    var v3 = + getField("Cell3"/100).value;

    Calculate and set the value of this field for the result

    Event.Value = v3 + (v1 + v2);

    Thank you

    Solan

    I have posted a reply, but realized that it wasn't what you wanted. There is some confusion about what you want for Cell3. A hand, you say that the user enter a vaule in the area, but them you say you want its calculated value based on what the user has entered and two other field values. It seems to me Cell3 should be the domain that the user enters the percentage, and the calculated field (Cell4) script could be:

    Get the first value in the field, as a number

    var v1 = + getField("Cell1").value;

    Get the second field value, as a number

    var v2 = + getField("Cell2").value;// get treatment field value, as a number

    Get the percentage

    var v3 = + getField("Cell3").value;

    Calculate and set the value of this field for the result

    Event.Value = (1 + v3 / 100) * (v1 + v2);

  • Need help with an instruction box with the data in the collection

    It is located in the section source on my interactive form, my collection process works, but there is "-" where there should be a "$0.00 ' in the summary section.

    There is a problem with my syntax of the case statement,


    Select pending, records c002 c001, c003 case $ if no then ' $0.00 ' if not no c003 end other "$0.00 ' from apex_collections where collection_name ="Summary1»»"

    Hi Doug,.

    The best way to handle this is with the NVL function, for example,

    SELECT c001 Awaiting, c002 Records, NVL(c003,0) Dollars ...
    

    and let the application manage the formatting of the field (which I suppose it's done for non-null values).

    However, if you want to use the CASE statement, here is how it works:

    SELECT CASE WHEN c003 IS NULL THEN 0 ELSE c003 END Dollars ...
    

    -Jennifer

  • Custom dialog box

    Hi all

    I need to have custom dialog boxes. I whent through http://developer.blackberry.com/native/documentation/cascades/ui/dialogs_toasts/tutorial_create_a_cu... this tutorial.

    But I need to build in the PRC.

    is this possible?

    I tried everything done porting the UTU in QML to CPP, by extending the Dialog class and all, the dialog box appears, but it is not black as when we show SystemDialog.

    isn't this possible in the PRC?

    Help, please!

    Kind regards.

    Found the solution! Make a custom control that looks like a dialog box, I need and behind the same added a container with blackish transparency to give it a feel of a system dialog box. and also, the user will not be able to interact with the screen as long as the dialog box appears on the screen.

    Kind regards.

  • Need help with my Mail window. I can't export my message to the PST format. I keep getting the message error "an error occurred during initialization of MAPI".

    Hello

    Need help with my Mail window. I can't export my message to the PST format. I keep getting the message error "an error occurred during initialization of MAPI". Y at - it solution or another method?

    Hi ErikLee,

    Do you have MS Outlook installed on your computer?

    Windows mail import and export opportunities are limited to an Outlook .pst file or an Exchange Server mailbox. They are available only if MS Outlook is installed.
    If MS Outlook is not installed and you start an import or export action, the necessary support files are not present for Windows mail complete the operation. Then I suggest you to install Outlook temporarily and see if the problem is resolved.

    Follow the instructions below and check if the problem is resolved.

    1. reboot your computer, and then start Windows Mail.
    2. on the Tools menu, click Options.
    3. in the connection tab, click on edit to open the Internet Properties dialog box.
    4. in the tab programs, click on an application other than Windows mail e-mail in the e-mail list. Click on apply and then click OK.
    5. click OK again to close the Options dialog box.
    6. exit Windows mail and restart Windows mail.

    If this does not work, I suggest you upgrade to Windows Live Mail to import or export messages that may help you resolve the issue.

    To download Windows Live Mail, visit the following Microsoft Web site:
    http://get.live.com/wlmail/overview

    For more information about Windows Live Mail, see the Microsoft Web site at the following address:
    http://windowshelp.Microsoft.com/Windows/en-us/help/4b30d3d6-abe2-46d1-a5fd-4a1ba786a1381033.mspx

    Check whether the problem is resolved.

    Please post back and let us know if it helped to solve your problem.

    Kind regards
    KarthiK TP

  • Hello, I need help with my photoshop, rececently the majority of my family disappeared merger options and I cant access AVC and other options ive tried reset preferences and it seems to come back but when I add an image and try add text again

    Hello, I need help with my photoshop, the majority of my family rececently disappeared options fusion and I can't access strokes and other options ive tried to reset the settings of preference and he seems to come back but when I add an image and you try to add text again, they'll only options I have are drop shadow , gradient, Chromakey, shine of satin overlay, inner (I use photoshop cc 2015) Please help, my Skype contact options are: RoblivionM8 and email:[email protected]

    Thanks for your time

    Your first screenshot shows the layer style dialog where not all types of effects are indicated on the left. Bottom left of the dialog box, you see a small icon fx with a menu arrow drop-down. Use drop down the menu and make sure all you click on show all effects or restore the default list. I don't know what you're trying the shoe on the second screen capture.

  • Create a custom dialog box

    I want to do a custom dialog box that triggers the box when a specific menuitem is clicked?

    Where can I design my dialog box and fill in the specific data in it? Is there a guide available to create custom dialog boxes? I looked in the guides provided with the sdk of illustrator CS6, but found nothing relevant

    From CS6, Illustrator offers no SDK for dialog boxes and an SDK for signs limited. In both cases, you will need to use a third-party solution (we use Qt) or platform (WIN32 or cocoa)-specific code.

  • Newbie needs help with cookie cutter in PSE8

    I'm new to PSE8, the cookie cutter tool and work with layers, what I need help with to accomplish what I want to do.

    I want to use one form of cookie cutter to make several 'holes' in an image, leaving a solid color background layer to show through. (Or another path, use the form of Cutter of biscuit as a solid 'rubber stamp' color to stop shape on the image in several places)?

    I opened my image in the editor and create a solid color fill layer, and then I select the shape of Cutter of biscuit that I want to use, for example a sheet.  Then I select the color fill layer, click and drag to create the sheet randomly somewhere in it.  When I release the mouse button, the window returns to the image and there is the leaf, locked in a box, in the color I want, on the image. I drag the box (leaves) to where I want it and click the green checkmark to accept. So far so good.  Here's the problem: in order to create another sheet on the image, I have to create another layer of fill and repeat the whole process.  If I try to use the same fill layer to a second sheet, the first sheet disappears.  I must be missing something very simple, but I can't figure out how to get out several sheets of a filling layer.  Also, I use a version without the constraint of the sheet because I would create several sheets of different sizes out of the fill layer as well.

    I would be grateful for any help or suggestion!

    Try the following:

    1. File > new > empty file - white
    2. Create a new layer, fill it red
    3. Create a new layer, fill it out of blue
    4. Access the marquee tool, drag the rectangle to the blue layer. You should see "ants in market". Press DELETE on the keyboard.  You should see red in the rectangular hole.
    5. Access to the custom shape (U) tool. In the form of culture library, select the heart shape black all and hang out on the blue layer. Press CTRL + left click the thumbnail of the layer of the capping layer for "mobile dotted." Hit delete on keyboard twice, and you should see red in the heart shaped hole.
    6. Continue with other forms.

Maybe you are looking for