Field button buttons below the overlay

I'm sure it's something I do accidentally, but when I try and view a collection of vertical buttons similar to the HelloWorld application in the getting started guide everything except the first button has an area of broad intervention which will overlap the buttons below it, making selection a challenge.  I checked in tab through and observing the yellow rectangle.  My code is below, but this is just a variant of the code example:

public function AIRHelloWorld()
        {
            var helloButton:LabelButton = new LabelButton();
            helloButton.label = "Hello World!";
            helloButton.addEventListener(MouseEvent.CLICK, showAlertDialog);
            helloButton.x = (stage.stageWidth - helloButton.width);
            helloButton.y = (stage.stageHeight - helloButton.height)/2;

            var myFormat:TextFormat = new TextFormat();
            myFormat.color = 0xAA0000;
            myFormat.size = 24;
            myFormat.italic = true;
            myFormat.align = "right";
            var text:TextField = new TextField();
            text.text = "Close Me";
            text.setTextFormat(myFormat);
            var closeButton:Button = new Button();
            closeButton.addChild(text);
            closeButton.addEventListener(MouseEvent.CLICK, closeWindow);
            closeButton.x = (stage.stageWidth - closeButton.width);
            closeButton.y = (helloButton.y - helloButton.height);

            addChild(helloButton);
            addChild(closeButton);
            stage.nativeWindow.visible = true;
            stage.nativeWindow.title = "Some App";

        }

Hey heavyg,.

I found the problem. in the code instead of using the LabelButton class, you use the default button ActionScript class. RIM created API and even remade some of the basics such as the button class in order to optimize the functionality with the Tablet OS. Then used the class optimized without a touchscreen button. So I recommend if there is another QNX class for a component (such as a Button) use the QNX version because it will have already been optimized for use in the tablet. Whereas the use of default components will give bugs like these.

Here is your code of origin, but with two things published. Above all, I replaced the Button object with the LabelButton object and the close text is now part of the LabelButton object instead of a child. The changes are in bold:

public function AIRHelloWorld()      {         var helloButton:LabelButton = new LabelButton();          helloButton.label = "Hello World!";           helloButton.addEventListener(MouseEvent.CLICK, showAlertDialog);          helloButton.x = (stage.stageWidth - helloButton.width);           helloButton.y = (stage.stageHeight - helloButton.height)/2;

          var myFormat:TextFormat = new TextFormat();           myFormat.color = 0xAA0000;            myFormat.size = 24;           myFormat.italic = true;           myFormat.align = "right";         var text:TextField = new TextField();         text.text = "Close Me";           text.setTextFormat(myFormat);         var closeButton:LabelButton = new LabelButton();          closeButton.label = "Close Me";          closeButton.addEventListener(MouseEvent.CLICK, closeWindow);          closeButton.x = (stage.stageWidth - closeButton.width);           closeButton.y = (helloButton.y - helloButton.height);

           addChild(helloButton);            addChild(closeButton);            stage.nativeWindow.visible = true;            stage.nativeWindow.title = "Some App";

      }

hope that things cleared up. Good luck!

Tags: BlackBerry Developers

Similar Questions

  • I'm looking to have an input field with the search button, search button click the search button below the search results to display. How can I do?

    I'm looking to have an input field with the search button, search button click the search button below the search results to display. How can I do?

    Hello

    998765 wrote:

    You are right

    Please pass by the database 2 day + Application Express Developer's Guide

    Check this code example

    1 create a text field element I say P1_INPUT_FIELD

    2. create a button

    Name of the button: search

    Action: Send the page

    3. change your report query and where clause to your query below

    It will search on ename and empno, in this way, you can add more columns

    SELECT EMPNO
               , ENAME
               , SAL
               , MGR
               , COMM
      FROM EMP
    WHERE TRIM(UPPER(ENAME)) like '%' || TRIM(UPPER(:P1_INPUT_FIELD)) || '%'
           OR TRIM(UPPER(EMPNO)) like '%' || TRIM(UPPER(:P1_INPUT_FIELD)) || '%'
    

    4. we find the source of the region-> page article to submit-> P1_INPUT_FIELD

    Hope this helps you,

    Kind regards

    Jitendra

  • My master made with a box of blank publication button below the content on child pages

    I did my buttons on main menu with an empty box of composition. I have the button on the B-Master page so it displays the same at the top of each page. When I saw it, and then click Open the buttons they seem to open a layer under the content on the page of the child. Anyone who is familiar with this problem and have a solution?

    Beza,
    I tried what you suggested, but I'm assuming we know different issues. I was, however, just able to solve my problem. I didn't know that muse has the opportunity to put objects on separate layers. Simply, I moved all my menus navigation to a layer above all of my content and that fixed my problem. Thank you very much for the help.

  • Buttons below the APEX 4.0.2 not generating an html APPLICATION

    ... during the publication of my original text, it seems to have disappeared.

    Anyway, my question has been to apply a button and why I couldn't see it from the process of page "Front of the head" (this also applies to 'Select list with Submit'). If I click on a button that makes a shipment (or choose from a 'select with Submit list'), I can see the request in the page process 'OnSubmit' but not the "OnLoad before head" process page. If I come home "& REQUEST.' in 'DEMAND' field of the unconditional branch of the request is available." I always thought that leaving the field of APPLICATION to empty of unconditional branch the reqest would be routed through default so I can test against it in a process of 'Head before'?

    Another scenario I'm mistaken, is too, when I have a button based on a model that has the code such as:
    < input type = "SUBMIT" value = "" #LABEL # "/ >,"
    I do not all apply? If I change the "input type" button, it works fine.

    THX
    Nigel

    Published by: theArrow on October 31, 2011 05:52

    Published by: theArrow on October 31, 2011 06:05

    theArrow wrote:
    Hi, just tried the code proposed above, but I get an error in my application saying: error ERR-1002 unable to find item for the 'REQUEST' element ID in the "13100" application If I use a javascript with apex.submit button, it passes through this systematic fine.

    I presume that for the SUBMIT type buttons it does not create a: QUERY element.

    I created a page element to: REQUEST and it seems to work.

    What is the right thing to do?

    N °

    Try

    apex_application.g_request := nvl(v('REQUEST'), 'SUBMIT');
    

    Looks like that he doesn't like the shape of link of : ASK in the code in the process.

  • Properly aligning the field button in the status bar?

    Hello

    I've set up a status as shown in the picture below scroll bar.

    The icons that were placed between the left and right arrows are not uniform in all devices. I want their position to decide taking into account the width of the screen of the device.

    Can anyone suggest how it should be done? I used GridFieldManager to place this icons.

    Can anyone suggest me something?

    We hope to get an answer soon.

    Hello

    I managed to solve my problem by using TableLayoutManager.

  • Label, change the field and the button on the problem of a line

    Hi all

    I was pulling my hair out on this and could really do with some tips. I'm putting a label, a text field and a button of bitmapfield on the same line, but for the life of me I can't work that way round. If I put the front button to the text box field, it works.

            // TEST 3 CONTROLS ON A ROW
    
            final Bitmap imgCalc = Bitmap.getBitmapResource("bgCalc.png");
    
            LabelField lb = new LabelField("0.00");
            EditField ef = new EditField();
            BitmapField  bf = new BitmapField(imgCalc, BitmapField.FOCUSABLE){
                protected void paint(Graphics g) {
                    // Draw text on button image
                    super.paint(g);
                    g.setColor(Color.WHITE);
                    int x = (40 - Font.getDefault().getAdvance("Go"))/2;
                    int y = (imgCalc.getHeight() - Font.getDefault().getHeight())/2;
                    g.drawText("Go", x, y);
                }
    
                public int getPreferredWidth(){
                    return 40;
                }
            };
    
            HorizontalFieldManager row0 = new HorizontalFieldManager();
    
            row0.add(lb);
            row0.add(ef);
            row0.add(bf);
    

    Excuse the code, but it's test code to make it work. As mentioned above, if I add that Label, Edit, Bitmap controls it only shows the label field and edit. If I swap the text field and the field bitmap around so that the text field is the last one, it works.

    What I am doing wrong?

    Thanks for looking

    Paul

    EditField always takes all of the width available to it.

    You must override its layout (width, height) and pass below the width values to leave space for the BitmapField. Something like

    protected void layout(int width, int height)
        {
            super.layout(width * 60 / 100, height);
            // sets width of this field to 60% of the total available width
        }
    

    would do.

  • Why my tabs intermittently change to be next to the button below orange? I want to stay next to the orange button, to save a row of room on the screen.

    Firefox 4.0 - tabs are below the orange button, I want to stay next to him to save a line of space.

    You get the tabs on the title bar if you maximize the window of Firefox.

    You can also watch the pref browser.tabs.drawInTitlebar the topic: config page.

  • Microsoft 4000 ergonomic, which are back and buttons just below the space bar for forward?

    Original title: tne on Microsoft 4000 ergonomic

    On the Microsoft 4000 ergonomic keyboard. What are the buttons back and next just below the bar of distinguished? I've never seen them do anything when I press them. And there is no link of programming the software set up for them.

    I just had the Microsoft 4000 ergonomic keyboard of THIS support in my office, and the back and the front keys work exactly as 'return' and arrows 'before' in my browser (Firefox).  I didn't do anything - program may be the game of the previous user upwards - but for me they work for the web back and forth, not navigation problem.

  • warning by email: we discovered the series of illegal attempts on your e-mail account of different areas of the intellectual property. It's for your own safety to continue to use your account, click on the button below.

    Original title:

    warning by email

    Got this e-mail with the subject attention!

    Is - is this legitimate?

    He wants me to press any key to continue

    Thank you

    Microsoft account
    Microsoft Security info
    We discovered the series of illegal attempts on your e-mail account of different areas of the intellectual property.
    It's for your own safety to continue to use your account, click on the button below.
    Continue
    Note: Please do not ignore this email to avoid your closed account
    Thank you
    The team Microsoft account

    Hello

    Phishing scam.
    Ignore!

    FYI

    Microsoft usually has a green shield on the name of the sender.

    This indicates that the e-mail coming from Microsoft / play the sender.

    If, in case of doubt, please check your email to see if the Green Shield is there. ***

    Phishing: Frequently asked questions
    How can I Report Spam, Phishing or abusive messages in Outlook.com?

    My account has been hacked

    How to recognize phishing e-mails, phone calls or links

  • Remove the edge of the field button (JDK 4.5)

    Hello

    It is possible to remove the border around the bitmap button class slot? So everything that appears when the image is just the image without borders.

    Thank you.

    This is my class-

    Import net.rim.device.api.system.Bitmap;
    Import net.rim.device.api.ui.Font;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.Ui;
    Import net.rim.device.api.ui.component.ButtonField;

    /**
    * Field button with a bitmap as its label.
    */
    SerializableAttribute public class BitmapButtonNoClickField extends ButtonField {}
    private bitmap Bitmap;
    bitmapHighlight private bitmap;
    Private boolean stressed = false;
    private fonts fonts;
            
    /**
    * Instantiates a new button bitmap field.
    *
    @param bitmap bitmap to use as a label
    */
    public BitmapButtonNoClickField (bitmap image Bitmap image, image Bitmap bitmapHighlight, label As String, int width, make police) {}

    This (bitmap, bitmapHighlight, ButtonField.CONSUME_CLICK |) ButtonField.FIELD_HCENTER | ButtonField.NON_FOCUSABLE | ButtonField.FIELD_VCENTER
    the label, width, police);
              
    }

    public BitmapButtonNoClickField (bitmap image Bitmap image, image Bitmap bitmapHighlight, long style,
    String label, int width, make police) {}
    Super (style);
    This.Bitmap = bitmap;
    this.bitmapHighlight = bitmapHighlight;
    This.font = fonts;
    }

    / * (non-Javadoc)
    * @see net.rim.device.api.ui.component.ButtonField #layout (int, int)
    */
    Protected Sub layout (int width, int height) {}
    setExtent (getPreferredWidth (), getPreferredHeight());
    }

    / * (non-Javadoc)
    * @see net.rim.device.api.ui.component.ButtonField #getPreferredWidth)
    */
    public int getPreferredWidth() {}
    Return bitmap.getWidth ();
    }

    / * (non-Javadoc)
    * @see net.rim.device.api.ui.component.ButtonField #getPreferredHeight)
    */
    public int getPreferredHeight() {}
    Return bitmap.getHeight ();
    }

    / * (non-Javadoc)
    * @see net.rim.device.api.ui.component.ButtonField #paint (net.rim.device.api.ui.Graphics)
    */
    protected void paint (Graphics graphics) {}
    width int = bitmap.getWidth ();
    int size = bitmap.getHeight ();
    Image bitmap b = bitmap;
    If (highlighted)
    b = bitmapHighlight;
    graphics.fillRoundRect (0, 0, getWidth(), getHeight(), 10, 10);
    graphics.drawBitmap (0, 0, width, height, b, 0, 0);
    graphics.setFont (do);
    Super.Paint (Graphics);
    graphics.drawText (label, 0, bitmap.getHeight ());
    }

    }

    If by "the code you posted" you mean advanced buttons, fields and managers, then no, it is not part of any levy JDE.  This has been created separately for reading more advanced developers. You must change the package names here as com.rim... do not work on any real device (works fine in the Simulator, however).

    There was a thread here in this forum about the legality of using the code in this article from book of knowledge - you can read it yourself:

    Legal issues Using - advanced tool buttons, fields and managers

    It wasn't for that resolution, but claim that it was already used in some applications. Personally, I am looking at the source code it orientation rather than a simple copy and paste. New - people claim she has some problems and I've seen questionable code in there in some places, but overall, it's extremely useful.

  • ID of passage with its values in the fields in form when the button is clicked.

    Tried to pass the value according to the button clicked with his id in to form.

    I am able to get the id in the right place as you can see in the Image below, but not able to pass all the different values of it.

    Global function:

    function get_id (id)

    { var a = parseInt (id)

    Apex. Item (P73_SHIP_ADDRESS_ID). SetValue (a);

    }


    Static page source:

    declare

    Id1 number (10,0);

    Start

    for rec in (select * from OMS_SHIPPING_ADDRESS where USER_ID =: P1_USER_ID)

    loop

    Id1: = rec. SHIP_ADDRESS_ID;

    sys. HTP.p ("< br > < div >");

    sys. HTP.p ('< a >' | sys.) HTF.escape_sc (CRE. TYPE) | "' < /a > < br / >"

    || sys. HTF.escape_sc (CRE. ADDRESS_LINE1)

    || ' , '

    || sys. HTF.escape_sc (CRE. ADDRESS_LINE2)

    || "' < br / >"

    || sys. HTF.escape_sc (CRE. CITY)

    ||  '-'

    || sys. HTF.escape_sc (CRE. ZIP_CODE)

    || "' < br / >"

    || sys. HTF.escape_sc (CRE. STATE)

    || "' < br / >"

    || sys. HTF.escape_sc (CRE. COUNTRY)

    || ' < br / > < input type = "button" value = "sΘlectionner" onclick = "get_id (id)" id ="" | recomm. SHIP_ADDRESS_ID | ' ' ' > '

    );

    sys. HTP.p ("< / div > '");

    end loop;

    end;

    Below the Image if I click select can pass id to send the address id but able to pass the address line1.line2, city etc...

    I tried to move to the global function also does not work! If someone could guide me!

    123.JPG143.JPG

    Hello

    If you have already passed the ID, then why don't you create a dynamic action on change of SHIP_ADDRESS_ID and load the details of database and fill in other areas.

    In this way the use of ID is understandable.

    --

    Sunil Bhatia

  • To DEVELOP the image don't copy not from before to after when you use the buttons in the taskbar below.

    In Lightroom, DEVELOP the image does not copy from before to after after using the buttons below.

    Is it possible LR shows before and after the same?

    By clicking on a button with >< can="" make="" them="" the="">

    You can reset the State 'Before' of a picture by right-clicking on a stage in the history panel.

    Press the [\] to also get a 'before '.

  • Buttons on the right side of my window a 'comment' field and 'fill and sign' open whenever I open a document. In order to read the text, I need to minimize this field. As I open many documents every day I change the settings so

    Buttons on the right side of my window a 'comment' field and 'fill and sign' open whenever I open a document. In order to read the text, I need to minimize this field. As I open many documents every day, I would like to change the settings so that this field is reduced by default. Is this possible?

    Hi joelh68258411,

    The issue was already fixed in the update, please refer to this note of release hide the tools Panel in Acrobat and Acrobat Reader DC at all times.

    Kind regards

    Nicos

  • I'm unable to deselect specific fields when you set the Reset button in a form.  I can only "select all" or "deselect all". Someone at - it happen?

    I'm unable to deselect specific fields when you set the Reset button in a form.  I can only "select all" or "deselect all". Someone at - it happen?

    Yes, this is a common problem. Use the SPACEBAR to toggle individual mailboxes.

  • A date today can be added in a date field when you press the submit button?

    I created a form with a "submit" button and the form is sent by e-mail.  Then the date when the form is submitted to appear in a date with the key field is pressed?


    Any help with this is appreciated. Thank you.

    Hello

    There is a preSubmit event to form objects that you can use.

    Select your date field, open the script editor and add this script (language is FormCalc) in the preSubmit event.

    $ num2date = (date (), ' MM/DD/YYYY')

Maybe you are looking for