two positioning buttons

Hello

I have a horizontalFieldManager h1 which USE_ALL_WIDTH, insidie this h1 is a verticalfieldManager with FIELD_BOTTOM style v1, this v1 has an another horizontalFieldManager h2 that contains two buttons, how can I do first button on the extreme left and the second button on the far right of h2, as shown in the following image

feniljain wrote:

You can set the Position of the two buttons in the sublayout of the Manager to add using setPositionChild.

... which means 'create your custom manager '. This is exactly what I suggested - but the example of "Advanced UI" has excellent examples of these managers. Study this code will teach you how to create these managers on your own. Moreover, one of the managers that I named is required to provide you with a solution.

Tags: BlackBerry Developers

Similar Questions

  • Need to align the two radio buttons in one line

    Hi all

    In my BlackBerry Application, I have a part of the user interface where I need to align two radio buttons in one line.

    I used the code to design the user interface, but the two radio buttons below are overlapping.

    SerializableAttribute public class BBSettingsScreen extends form {}

    Rbg RadioButtonGroup = new RadioButtonGroup();

    RadioButtonLayout raButtonLayout = new RadioButtonLayout();

    raButtonLayout.add (new RadioButtonField ("ONE", rbg, true, RadioButtonField.FIELD_RIGHT));
    raButtonLayout.add (new RadioButtonField ("TWO", rbg, false, RadioButtonField.FIELD_LEFT));

    Add (raButtonLayout);

    SerializableAttribute public class RadioButtonLayout extends Manager {}

    public RadioButtonLayout() {}
    Super(Manager.VERTICAL_SCROLL |) Manager.RIGHTMOST);
    }

    protected void sublayout (int width, int height) {}
    Field field;
    get the total number of areas falling under this Manager of
    int numberOfFields = getFieldCount();
    int x = 0;
    int y = 0;
    for (int i = 0; i)< numberoffields;i++)="">
    field = getField (i); get the field
    setPositionChild(field,x,y); set the position of the field

    layoutChild (field, width, height); Spread the field
    x += 30;
    }

    width = 70;
    height = 20;

    setExtent (width, height);
    }

    }

    }

    Please help on this...

    Thank you & best regards

    Chintada Ravikumar

    Try this:

    RadioButtonGroup rgb=new RadioButtonGroup();
    HorizontalFieldManager hr1=new HorizontalFieldManager(FIELD_HCENTER);
    RadioButtonField radioOne=new RadioButtonField(" RadioOne",rgb,true)
    {
        protected void layout(int width, int height)
        {
            super.layout(75,30);//Width and height according to the button name;
            setExtent(75,30);//width and height according to the button name;
        }
    };
    hr1.add(radioOne);
    RadioButtonField radioTwo=new RadioButtonField(" RadioTwo",rgb,false)
    {
        protected void layout(int width, int height)
        {
            super.layout(75,30);//Width and height according to the button name;
            setExtent(75,30);//Width and height according to the button name;
        }
    };
    radioTwo.setPadding(0, 0, 0, 20);
    hr1.add(other);
    add(hr1);
    
  • Computer seems there two start button and the HDD was Overdrive, even if the computer was not running applications

    Original title: Windows Vista - Start button

    I just noticed has obtained what appears to be two start buttons - each other, but I can't back that it's relative as recently the hard drive on my pc was in overdrive even if I wasn't anything running.  Has anyone else had the same problem and if so how to solve?

    Hello

    1. don't you make changes to your computer before the problem?

    I suggest that you follow the steps below and check if the problem persists.

    Step 1:

    Test the issue in safe mode.

    Start your computer in safe mode
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    Step 2:

    If it works fine in safe mode, there must be a third party software that is causing the problem to occur, this is why I suggest you put your computer in a clean boot state.

     
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135

    Note: Put your computer in normal mode (step 7).

    Step 3:

    Regarding problems with the hard drive, I wish that you control readers for possible errors.

    Access the link below and follow the steps to check the drive for errors and fix it.
    http://Windows.Microsoft.com/en-us/Windows7/check-a-drive-for-errors

    Warning of CHKDSK

    Important: Running chkdsk on the drive if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data can be lost.

    Step 4:

    Run a complete check for viruses on your computer using your security software or an online Microsoft Safety Scanner.

  • How to horizontally align two option buttons?

    Hello

    I try to add two radio buttons at my request. Is there an easy way to align two boxes horizontally on the screen without using the gridFieldManager?

    Thank you.

    My code

    Rbg RadioButtonGroup = newRadioButtonGroup();

    Add (new RadioButtonField ("AAA", rbg,true, RadioButtonField.FIELD_VCENTER));

    Add (new RadioButtonField ("BBB", rbg,false, RadioButtonField.FIELD_VCENTER));

    There is also a universal thing, solve the problem.

    You can limit the width of any predefined field (for example RadioButtonField) using the following simple page layout override:

    protected void layout(int maxWidth, int maxHeight) {
      super.layout(Math.min(maxWidth, myDesiredWidth), maxHeight);
    }
    

    Since the fields created by RIM meekly obey the limits passed for them (unlike many custom fields, I see here in the forums ), this will limit the width of your RadioButtonField and let the other have little place in the same HorizontalFieldManager.

    Good luck!

  • two radio buttons on the same line

    Hello

    I wanted to add two option buttons, which should appears on the same line, which is provided for in the other. How can ido that?

    I try like this:

    VerticalFieldManager vfmMain;
    HorizontalFieldManager hfmRadio;

    Household RadioButtonField, rSetup;

    Household = new RadioButtonField ("View");
    rSetup = new RadioButtonField ("Setup");

    hfmRadio = new HorizontalFieldManager (HorizontalFieldManager.FIELD_HCENTER);

    hfmRadio.add (household);
    hfmRadio.add (rSetup);

    vfmMain = new VerticalFieldManager(VerticalFieldManager.HORIZONTAL_SCROLLBAR |)
    VerticalFieldManager.VERTICAL_SCROLLBAR);

    vfmMain.add (hfmRadio);

    but his he sent me some exception.

    any idea?

    Thanks in advance.

    Hey guys find a solution very simple for this

    VerticalFieldManager vfmMain;

    HorizontalFieldManager hfmTemp;

    vfmMain = new VerticalFieldManager();

    hfmRadio = new HorizontalFieldManager();

    RadioButtonGroup grp;

    View RadioButtonField, Setup;

    GRP = new RadioButtonGroup();

    view = new RadioButtonField ('View', grp, true, RadioButtonField.FIELD_LEFT);

    Setup = new RadioButtonField ("setup", grp, false, RadioButtonField.FIELD_RIGHT);

    hfmRadio.add (view);

    hfmRadio.add (setup);

    vfmMain.add (hfmRadio);

    try this if someone is loking for the option button

  • two radio buttons on one line

    Hello

    I can't do radio two buttons appear on the same line.  I see only the first option button...

                RadioButtonGroup group = new RadioButtonGroup();            RadioButtonField radio1 = new RadioButtonField("one", group, true);            RadioButtonField radio2 = new RadioButtonField("two", group, false);            HorizontalFieldManager hfm = new HorizontalFieldManager();            hfm.add(radio1);            hfm.add(radio2);            add(hfm);
    

    I tried different settings of style on the option and Manager of the horizontal boxes.  I also tried extending RadioButtonField to explicitly set the field width.  So far no luck...

    I work with version 4.2.1.

    Any help would be appreciated.

    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Manager;
    
    public class RadioButtonLayout extends Manager{
    
        public RadioButtonLayout() {
             super(Manager.VERTICAL_SCROLL | Manager.RIGHTMOST);
        }
    
        protected void sublayout(int width, int height) {
             Field field;
               //get total number of fields within this manager
               int numberOfFields = getFieldCount();
               int x = 0;
               int y = 0;
               for (int i = 0;i < numberOfFields;i++) {
                   field = getField(i); //get the field
                   setPositionChild(field,x,y); //set the position for the field
    
                   layoutChild(field, width, height); //lay out the field
                   x += 30;
               }
    
               width=70;
               height=20;
    
               setExtent(width, height);
        }
    
    }
    
    RadioButtonGroup rg = new RadioButtonGroup();
    
    RadioButtonLayout v = new RadioButtonLayout();
    
    v.add(new RadioButtonField("", rg, true, RadioButtonField.FIELD_RIGHT));
            v.add(new RadioButtonField("", rg, true,  RadioButtonField.FIELD_RIGHT));
    
    screen.add(v);
    
  • Condition of two option button are true then...

    Hi all

    Please forgive me if I post my question in the wrong group.

    I'm running LiveCycle Designer ES ver: 8.2.

    I created a form that contains two different sets of radio buttons.

    The use of Javascript, I'm writing a piece of saying code:

    If the radio 1 = '1' and 4 '1' = radio button, then this text box is read-only and grayed.

    My script is as follows:

    Form1.restrictions - positioned.restrictionFrequency::click - (JavaScript, client)

    If (foodStuff.rawValue is "1")

    {

    This.Access = "readOnly";

    this.fillColor = "216, 216, 216";

    This.Border.Edge.Presence = 'hidden ';

    }

    This code does not work? Is it because I put it in the text box? What the option 'display '. I tried to put the code in 'click', 'validate', etc., with no result. (Note: I don't know how to use this section either)

    Your insight is appreciated.

    Thank you

    Erik

    Solve the problem.

    The code will now appear like so:

    Form1.restrictions - positioned.restrictionFrequency::click - (JavaScript, client)

    If (foodrestriction.resolveNode("foodStuff").rawValue is "1")

    {

    This.Access = "readOnly";

    this.fillColor = "216, 216, 216";

    This.Border.Edge.Presence = 'hidden ';

    }

  • Two small buttons on the side of the switch just stop working - Tecra M5

    I had this problem before too many and I was told that the way to resolve the issue was a recovery CD, which means losing all my DATA and blabla... The problem is that the two very small buttons on the side of the switch just stop working.

    Just as that. They are always connected as when the laptop is on in standby or hibernation mode if you click on them it restart the machine. We tried something with Toshiba technician before and also their repair without success Center (change the purpose of the button, reinstall the program etc...) The only remedy was still a lot of recovery CD and a replacement of the machine, thank you for that. The sentence is still started. It could be a problem as cookies, just a wild guess or anything else.

    Now, nobody knows how to solve this problem, or had the same problem?
    Thank you. Olivier

    You talk about the presentation of Toshiba and Toshiba Assist buttons. Am I wrong?
    It seems that there might be corrupted registry keys or the common modules stopped working.
    Why? I put t know but perhaps I got a solution
    Try reinstalling the common modules.
    First remove it from the Add & Remove programs. Then restart the laptop and install the downloaded again common modules.

  • A VI with two stop buttons

    I have a single VI which shows the two stop on the front panel buttons. My scheme is quite simple with 2 while loops and the other for loop. Whence the second stop button? Why is the second button here? How can I remove the second stop button?

    Brijesh says:

    Hello

    When you put two while loop. Stop button automatically two will come.

    Not always true. It all depends on what part of the palette that you select while a loop from. I can't, however, don't forget the name of the part of the pallet where it automatically to the stop button. There are also better ways to stop the parallel loops as the queues or the authors of the notifications if you have more than 2. Or, the action engines (I always throw this to save Ben from having to post!)

  • OK button on one/two messages button is a kind of police bad

    Hi guys!

    I installed SP1 LV2010 and now I have some problems with the message of one/two button. Maybe for three key also. If I did not define a constant to the message button, this happens:

    The OK button nothing like OK. If I put on a constant and write 'OK' in there, the OK button is normal. I usualle don't bother, putting on the constant as the standard text is "OK". This problem effects also my old wich programs with as I have never had any problems. It affects other computers with the Run-time 2010SP1 when I install my new applications.

    Anyone know what could be the problem?

    Hello

    Have you tried to do a repair of LabVIEW via Add/Remove programs in windows?

    To check if this is a problem of language compatibility, you can try to change to English format in the region and language in Control Panel and see if the error is still there. I have tried this function to our offices with a Norwegian operating system and was not able to reproduce.

    Concerning

    Espen

    AE NOR Norway

  • Fill in the text field when TWO radio button is unchecked

    Hello

    I don't know anything about javascript and need help.  I have a photography contract I want to offer a "discount package" of $50 when the two services will be used.  1 service is 'Photography coverage' and Service 2 'Photo Booth Rental'.

    Text field 1 = subtotal (calculates the values of checkbox and radio button)

    Text field 2 = discount (it's where I need help.  I would like this automatically filled with $50 when my default two boxes are not selected.  But only when the TWO are not selected)

    Text field 3 = Total (which has a basic calculation of the Subtotal-Discount)

    The services of two by default (it's done on purpose, I checked from the beginning) are both set to the '0' values to keep the subtotal $ 0.  If the client will use a service (which means one of the default selections will be selected), then there will be no discount, but if they decide to use photography and the cabin, they save $50.

    Can someone please help me to write a script for the text field, Discount calculation, to accomplish what I ask?

    Untitled-3.jpg

    You can use something like what the calculation script custom field discount:

    Event.Value = (this.getField("Service1").value == 0 | this.getField("Service2").value == 0)? 0: 50;

    Simply adjust the field names in the code to match the real in your file.

  • Adobe Captivate 7 - control the visibility of the two navigation buttons according to by clicking on the "sending answers" - button

    Hello

    How can I do the following:

    The navigation of my e-learning consists of two arrows. By clicking on one that you can move forward, by clicking on the other, you can go back.

    When users reached a Drag and Drop exercise slide in e-learning, should not go backward or forward, so the navigation should be disappear. The learner must answer the drag and drop exercise by clicklng the button 'send reply '. After that, the navigation should appear.

    I have UN-click on the checkbox for the two arros 'visible in the output' in the settings for the group that contains the two arrows, so they are not visible in the output for the moment

    How to go on?

    I think I have to combine the "submit answer" button action, but I can't assign an action on the button "send the answers."

    So should I assign an action to the slide? But which?

    Thanks for your help!

    Greetings

    Erica

    You can use the Drag and Drop action success of interaction to DISPLAY the missing arrows when a user correctly place all objects to slide on their targets.

  • Form two submit buttons

    Hi all

    I have a form and I want to use the different buttons to submit. 'APPLY' and 'SAVE '. The only difference being that the SAVA which takes back you to the same page and APPLY sends you to another page. Now I want to use AJAX, but as there is an attachment file on the form and means of previous experience what AJAX will not work.

    Any help would be great.

    At soon Daniel

    I have included only the code I changed work from the code you provided. I would have preferred rendered HTML, but it should help you get and help you on the right track.

    I have used jquery, be sure that it is included in the header. If you need support IE8 or IE9 use v1.9.1, if you care or not worried any version that should work.

    Bit of background, I present in parallel positions (so no waiting) and then launch a function to run when one of them come back, so he won't be the one who finishes first question. You can set the action in the javascript or the line of action in the form itself. The second URL action lies in the function itself, but it could be anywhere.

    This code is not tested, but you should get on your way, please let me know if you have any questions, happy to help you.

  • Position buttons ScrollPane in another frame

    I was searched everywhere but not not solved my problem:

    As part of the '2' I've got a ScrollPane with text scrolling long external sfw. At his side I buttons linking to a certain position of the roller so that they:

    {We (Release)}

    ScrollPanename.vPosition = 200;

    }

    (where 200 is number of pixels down from the top)

    My problem is that I would also have these on the framework '1' (main menu) shortcut buttons so they can jump directly to the position of ScrollPane as part of '2' by the press.

    Please, please, help me! The project approaching deadline!

    One way would be to have the scrollpane frame 1 but keep invisible until the frame 2.  Otherwise, you will need to have a variable that you set frame 1 and extends through the frame 2 such that a conditional in frame 2 could use this variable to direct the scrollpane to adjust.

  • "Home" stuck in "Over" position button

    I don't know why, but my home button seems to be stuck in the position of "Over". I did not any changes to navigation, and it just started to manifest itself there are a few additions. I use pop menu magic 2 for Dreamweaver and combed through the css to see what may be the cause of this but I can not find it. If anyone can help it would be appreciated.

    http://grizzlyutah.com/Grizzly_Graphics_Test

    Moreover, it is what it is SUPPOSED to do.  When you are on the page that is associated with the button, this button puts in position 'more '.  It's a way of saying 'you are here '.

Maybe you are looking for

  • Siri dials is no longer my partner

    Before this recent update I had no problem at all call my partner using siri. She recorded her name correctly in the text and her dial correctly. It was essentially 100% accurate and convenient. But now he records his name in the text correctly every

  • Snap crackling bounces Pop

    From a (roughly) of the week ago, my bouncing, if they play at all, only to issue a slight crackling. Anyone else having this problem? Or, more important, someone knows how to solve this problem?

  • I don't know the security password for my motorola crush

    I got it from a friend who bought at a yard sale and I want to reset the phone but do not know the password of security what to do?

  • What is the precision used by DIAdem during the integration?

    Hello I have been using DIAdem to perform digital integrations of force with respect to displacement and pressure with regard to travel (all acquired signals). These calculations are needed to determine the actuation and energy output associated with

  • No Internet after October Windows 7 update

    I have Windows 7 Home Premium 64-bit. 10/13/2010 my computer has installed several Windows updates. Immediately after the restart, I couldn't have an internet connection on Firefox (or Explorer or other). Problemmatic computer is a brand new Dell XPS