Addition of two basicEditFields in HorizontalField Manager

I try to add two basic change fields in a Horizontal field Manager. But, I don't know why, that one field is in veiw cannot see the second field anywhere. Here is the code I use:

 HorizontalFieldManager hfm ;
    VerticalFieldManager signUpMngr;
    BasicEditField cc, number;
    int width = (((Display.getWidth()*25)/100)-20);
    public UserScreen() {
        cc = getBasicEditField(4, BasicEditField.FILTER_NUMERIC,width ,5, 5, 5, 5);
        number = getBasicEditField(11, BasicEditField.FILTER_NUMERIC,width ,5, 5, 5, 5);

        hfm = new HorizontalFieldManager(USE_ALL_WIDTH|NO_HORIZONTAL_SCROLL|NO_VERTICAL_SCROLL){
protected void sublayout(int maxWidth, int maxHeight) {
    // TODO Auto-generated method stub
    super.sublayout(maxWidth, maxHeight);
    int count = getFieldCount();
    int x = 20;
    int y = 10;
    for (int i = 0; i < count; i++) {
    Field f = getField(i);
    layoutChild(f, f.getWidth(), f.getHeight());
    setPositionChild(f, x, y);
    x += cc.getWidth()+5;
    }
                   setExtent(Display.getWidth(),Display.getHeight());
   }
};
    hfm.add(cc);
    hfm.add(number);

   signUpMngr = new VerticalFieldManager(USE_ALL_WIDTH | USE_ALL_HEIGHT | VERTICAL_SCROLL);
   signUpMngr.add(hfm);

   this.add(signUpMngr);
}

public BasicEditField getBasicEditField(final int size, final long style,final int fieldWidth, final int topPadding, final int rightPadding,final int bottomPadding, final int leftPadding) {
  BasicEditField field = new BasicEditField("", "", size, style) {
    protected void paint(Graphics graphics) {
           graphics.setColor(Color.GRAY);
       getFont().derive(Font.BOLD);
       super.paint(graphics);
    }

    protected void paintBackground(Graphics g) {
       g.setColor(Color.GRAY);
       g.drawRoundRect(leftPadding, 0, fieldWidth- (leftPadding + rightPadding), this.getHeight(), 12,14);
       super.paintBackground(g);
        }
  };
  field.setPadding(topPadding, rightPadding + 2, bottomPadding,
                leftPadding + 2);
  return field;
 }

Concerning

Here's the answer to your problem:

HorizontalFieldManager problem

Tags: BlackBerry Developers

Similar Questions

  • the addition of two unequal dimensions 2D arrays

    Hello everyone,

    Once more, I have a very basic question. I try to add two tables with different line size 2D. the function "create array" creates a 3D Board. I use the array function to reshape to convert 3D table a table 2D. It works fine if I have two table of the same size, but if the size of the row of the first table 2D is less than the second, it is added an additional line of zeros between the two. I can understand why she is doing this, but I don't know how I could avoid it. is there another effective way if the addition of tables without creating a 3D table?

    The example I've been working on is attached.

    Thank you!

    odessy27 wrote:

    the function "create array" creates a 3D picture

    This function table build a right-click and select "entries to concatenate" and you will get a table 2D.

  • My drivers optical dvd rw disappeared two identical - poster Device Manager! mark beside the two circles in yellow

    Yes I know I'm a dinasauer still under kind of WinXp Pro Home edition use it - my burner gone--not recognized by my computer - I checked the Device Manager, they are there, but the two identical optical dvd rw drives have a! Mark surrounded both in yellow that I restored the system when I had a player that nothing changed - Help! Looks like I need some drivers, but I thought that windows would have covered them in case of default?

    Hello

    1. What is the exact error message you are getting?

    2. don't you make changes to the computer before the show?

    Please follow the steps from the link below.

    Important: this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    http://support.Microsoft.com/kb/322756

    How to back up and restore the registry in Windows

    Your CD or DVD drive is missing or is not recognized by Windows or other programs

    http://support.Microsoft.com/kb/314060

  • EditField + BitmapField in a horizontalfield Manager

    Hello

    I use code below to show a field of editing and Bitmap in a horizontal field Manager, but I'm getting illegal state exception...

    If I first add BitmapField and then change the field it works fine but I need Editifield first and then BitmapField

    Below is my code...

      Bitmap bg = Bitmap.getBitmapResource("twenty.png");
      locations = new BitmapField(bg,bg,"Locations");
      EditField table=new EditField("Ticket No : ","",5,EditField.FILTER_NUMERIC)
             {
                    private int iRectX = getFont().getAdvance(getLabel());
                    private int iRectWidth = Display.getWidth() - iRectX - 4;
                    public void paint(Graphics g)
                     {
                                g.setColor(0x000000);
                                g.drawRect(iRectX, 0, 170, 18);
                                super.paint(g);
                    }
             };
    
      HorizontalFieldManager hfm=new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH);
      hfm.add(locations);
      hfm.add(table);
      add(hfm);
    

    I already tried taking two horizontal field to add the edit field in the image in another Manager and added these two leaders in vertical field but no luck...

    I also tried traced table...

    EditFields use the full available width.
    You can crush getPreferredWidth or use a custom presentation:
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/...

  • Architecture with two versions of vCOPs management Suite

    Hello

    I appreciate any help on this issue. I have a client who wants vSphere Enterprise to Enterprise vSOM (with vCenter Operations Manager Standard... by default).  This customer has some virtual machines that need monitoring of application., and as you know, it's possible witht vFabric Hyperic available later in the Operations Manager vCenter Enterprise. If the customer is going to buy this two products:

    -vSOM Enterprise: vSphere Enterprise + vCenter Standard Operations Management Suite (licensed per processor)... for the upgrade.   And

    -Operations Management Suite Enterprise (package of 25 OS Instance) vCenter... for VMS that need monitoring.

    In architecture, the question is whether they can 'mix' present two types of license in the same hosts, or if they put those VMs who need follow-up to separate host applications?

    Thanks for your help!

    It is possible to have two different instances of vC registered to a unique vCenter Ops.  My recommendation would be to manage these two versions at the cluster level (Group A would vSOM, Cluster B would be vC OPS, for example).

  • I can't power on a virtual machine (with linked disks) after the addition of new hosts of Lab Manager

    ENVIRONMENT

    -Lab Manager 3 using VC 3.5

    -Initially the 2 hosts in a cluster and managed by LM

    -Added new cluster with 2 new hosts in VC

    -Two bunches pointing to the same NFS storage

    PROBLEM

    -When you try to turn on a computer in new cluster, I get a "requested file" "not found" error

    RESULTS

    -This seems to happen only when creating a virtual machine that has virtual disks of parent; most of our VMS is linked clones

    -When you look at the log file, please see attachment, we found the following:

    It is the location of the new virtual machine in the new host:

    /vmfs/volumes/fabdf38d-beff047d/LMW2K3/2909/002909-T_XP_SP3_32b.VMDK

    When you look at the hard, it points to the parent disk, but it seems that it does not:

    /vmfs/volumes/6586c772-53eee1bb/LMW2K3/2904/002904-T_XP_SP3_32b.VMDK

    Please note th volumen IDS are different and can not get the disc parent of the new machine.

    SOLUTIONS?

    Thank you

    Jose

    You should immediately stop using the new hosts otherwise creating new virtual machines can spoil the vmdk channels. Try http://kb.vmware.com/kb/1005930.

  • 24 bit MSB - LSB in addition to two the number of spell

    Hi all

    I read bits out of an ADC by sbRIO serial 9602 via DIO on P4 connector.

    ADC sends 24 bit MSB first as a supplement to two: How can I convert it to hexadecimal number they represent the FPGA VI?

    is there already a VI that I have not yet found?

    Thanks in advance.

    Hi Mariano76,

    The VI I think you are looking for is "Boolean Array number.  This primitive interprets an array of Boolean integer.  If you must reverse the sign-MSB/front bit for it to go in this function, you can use the function "Reverse 1 table D.  If you want to interpret these hex data in fixed point representation, the cast function is appropriate.  Once the FXP format, you can scale your ADC full scale data (i.e. +/-10V).  You can drag this code in your LabVIEW FPGA block diagram to test.

    See you soon,.

    SPEX

  • How can I get my computer to open with two users. I managed to lose a

    I had two user some how Media Player library eliminated one of them & I can't find out out to go back to change user

    Hello

    To help you to propose measures to solve the problem, I would appreciate if you could answer the following questions:

    1. are you referring to switching users on the computer?

    2. what exactly is the problem with Windows Media Player?

    3 have there been recent changes made on the computer before the show?

    For more information, see the links.

    How to use the Windows XP Fast User Switching feature

    A discussion on the availability of the fast user switching feature

    Please get back to us with the information above to help you accordingly.

  • to align the label Center field in horizontalfield Manager

    Hello world

    I have three field label inserting in horizontal field Manager, by default, it is show laft alignment.

    But I need to put all the Center horizontally.

    someone can help me.

    My code is given below

    HorizontalFieldManager curencyPrice = new HorizontalFieldManager (HorizontalFieldManager.FIELD_HCENTER |) Manager.USE_ALL_WIDTH)
    {
    public int getPreferredHeight() {}
    Return ((int) ((30 * screenHeight) / totalHeight));
    }

    public int getPreferredWidth() {}
    Return ((int) ((200 * screenWidth) / totalWidth));
    }

    protected void sublayout (int maxWidth, maxHeight int) {}
    Super.sublayout (getPreferredWidth (),
    getPreferredHeight());
    setExtent (getPreferredWidth (), getPreferredHeight());
    }
    };

    value = new CustomLabelField_Land ("" + ht.get ("currencySymbolLeft") +"", 12389754, 25, 0,)
    // 0);
    curencyPrice.add (value);

    String s = ht.get ('price') m:System.NET.SocketAddress.ToString ();

    Value1 = new CustomLabelField_Land (s, 1521508, 25, LabelField.FIELD_HCENTER, 0);

    curencyPrice.add (value1);
    value11 = new CustomLabelField_Land ("" + ht.get ("currencySymbolRight"), 12389754, 25, 0, 0);

    curencyPrice.add (value11);

    Thanks in advance

    By default, a LabelField will only the space he needs.  And a HFM will also take only the horizontal space he needs.  You can add your HFM to a VerticalFieldManager and ensure that the HFM says FIELD_HCENTER and it focuses, as a value for money defaults across the width.

  • Key events on the fields in the custom horizontalfield Manager

    Hi all

    I created the screen with a title bar and toolbar.

    The toolbar is created with a HorizontalFieldManager.

    Toolbar contains three BitmapField and a LabelField.

    How can I manage the key events of the fields in the HorizontalFieldManager.

    Where I need to override the keyChar() method.

    I did something wrong here. I do not receive the dialog box by pressing the Enter key. It is moving to the next icon that's all.

    I can move each icon by using the arrow keys, it is also developed. But when I press the Enter key, it goes to the next icon.

    I want to show the new screen by pressing the Enter key on each icon in the HorizontalFieldManager.

    How can I solve this problem... Any help...

    Override KeyDown() in your screen. As:

        public boolean keyDown(int keycode, int time)
        {
            System.out.println("Enter key pressed!");
            if (icon1.isFocus())
                Dialog.inform("show page1");
            else if (icon2.isFocus())
                Dialog.inform("show page2");
            else
                Dialog.inform("show page3");
    
            return true;
        }
    

    Concerning

    Bika

  • What should I do if I want to use Lightroom CC in addition to two PC?

    Dear Sir

    Can I subscribe two plan to photograph at the same time?

    AM

    You would need a different Adobe ID to subscribe to another plan of photography.

  • Addition of two variables inside xslt

    Hi all

    I try to add two variables inside xslt. The result is written to a target node, but I am getting "Nan" in output.

    Here's my xslt.

    < name of xsl: variable = "Amount1" >
    < xsl: choose >
    < template test ='(po:ID = «Distributeur») and (po:TypeCode = "Text_products_base_price7")' >
    < xsl: value-of select = "po:Amount" / >
    < / xsl: When >
    < / xsl: choose >
    < / xsl: variable >
    < name of xsl: variable = "Amount2" >
    < xsl: choose >
    < template test ='(po:ID = «Distributeur») and (po:TypeCode = 'VAT') ">"
    < xsl: value-of select = "po:Amount" / >
    < / xsl: When >
    < / xsl: choose >
    < / xsl: variable >
    < name of xsl: variable = "Value TotalAmount" select = "$Amount1 + $Amount2" / >
    < customer: priceDistributorUnitInclVAT >
    < xsl: value - of select = "number ($TotalAmount)" / >
    < / client: priceDistributorUnitInclVAT >

    I want to add Amount1 and Amount2 and use it to map it to the target node.

    The entries on the way to the sum in a third variable. ?

    Kind regards
    Vikas

    Hi Vikas,

    You must include xsl: otherwise in your xsl: choose the clause, it seems to me that your state of health one of the variables will be always Nan and a number + Nan will always result in Nan.

    Look at this
    http://w3schools.com/xsl/xsl_choose.asp

    See you soon,.
    Vlad

    It is considered good etiquette to the answerers rewards with points (as "useful" - 5 pts - or 'correct' - 10pts)
    https://forums.Oracle.com/forums/Ann.jspa?annID=893

  • Addition of two Variables

    Hi experts,

    I have only one requirement to sum up the values of the two variables. Can you explain what is the syntax for it. ?

    Thank you..

    If you two xml elements you may have directly as
    If you mean variable xdoxslt, you can summarize their as usual.

  • addition of two rollover image

    Guys, how can I add 1 more picture on 1 ride on area?

    sample:

    rollover are equal to 1 picture... I would add 1 image more below the first image... How do I do that?

    the 2nd image is designed to cover the body of the text on the slide, because the first image that I was a bit small. IM thinking of the 2nd image would be white object that goes along with the layout of slides.

    IM using captivate 5.5

    Use the slidelet in this case, because by default it offers you two events that you can use to trigger an action (Advanced): flip, and then click events.

    Of course the EventHandler widget offers many more possibilities,

    Lilybiri

  • Addition of two functions in a single button (gotoAndStop, sound judgment)


    Hi all! First of all, I would like to say that I am a beginner total with respect to as3. Okay, let's look at my problem... I have 2 scenes (first of all is a main menu with the button New Game; second scene is the intro for the game). I'm having difficulties to do two functions within a single button. Why do I need that? The first function is to go to the next scene (in my case, IntroScene). Second is to disable the sounds, so I can not hear them in the next scene.

    Here is the code:

    var bobobg:bobomusic;
    var sndChannel:SoundChannel;

    bobobg = new bobomusic;
    sndChannel = bobobg.play ();

    MAIN - NEW GAME MENU BUTTONS
    newgame_btn.addEventListener (MouseEvent.CLICK, buttonClick3);
    newgame_btn.addEventListener (MouseEvent.CLICK, buttonClick4);
    function buttonClick3(event:MouseEvent):void {}
    gotoAndPlay (1, "IntroScene");
    }
    function buttonClick4(event:MouseEvent):void {}
    bobobg. Stop();
    }


    Error message: "TypeError: Error #1006: stop is not a function."
    to MainMenu_fla::MainTimeline/buttonClick4().

    I would appreciate if someone could help me with this. Thank you!

    Ok.  Just do this:

    var bobobg:bobobgmusic = new bobobgmusic();
    var sndChannel:SoundChannel = new SoundChannel();

    sndChannel = bobobg.play ();

    MAIN - NEW GAME MENU BUTTONS
    newgame_btn.addEventListener (MouseEvent.CLICK, buttonClick3);

    function buttonClick3(event:MouseEvent):void
    {
    gotoAndPlay (1, "IntroScene");
    sndChannel.stop ();
    }

Maybe you are looking for

  • Chart crashes on the Satellite M40 154

    I have a problem with my Toshiba M40-154. It has Pentium clocked at 1.73 Ghz with X 600 graphics card. The laptop was marketed as an entertainment machine, but my graphics driver crashes. Whenever I play a game involving lesser graphics, such as unre

  • 2015 Macbook: keyboard product strikes without touching (for only the T key)

    I have a Macbook or 2015 in perfect condition, original owner, never damaged, still under warranty. A few months ago, I noticed that the T key would occasionally insist on its own. With nothing, contacting the keyboard, keys T would have picked up. T

  • Satellite A300 with Chinese words

    I have satellite A300-234 and a problem: when I surfed on canvases, some ads on certain websites (English or another except Chinese web), notes on system errors occur by the Chinese.Why is this?

  • Install the drivers downloaded from a CD

    A friend gave me his non-working HP Pavilion dv8135nr Media computer laptop under Win XP Home. I finally managed to do start, but missing drivers and other programs. Support of HP Recovery Kit is no longer available at HP and I can't connect to the i

  • Email Sign-In problem

    Hi, this is the only place where I could run. I'm unable to access my email. I used to open it, and then suddenly - my browser reports a script error (I checked it by clicking on the Java Script error message) - I'm not a programmer, so I don't under