How to paint two ObjectChoiceField on the same line

Hello Experts!

I tried to draw two ObjectFieldChoice on the same line, but the work doesn´t, I found this post that have the same problem as me, but the fix doesn´t works for me.

My code:

...
                  String[] tipos = new String[] {"BLA1", "BLA2" };
        _tipo = new ObjectChoiceField(null, tipos, 0, FIELD_VCENTER) {
            protected void layout(int width, int height) {
                super.layout(width - 235, height);
            }
        };
        _tipo.setBorder(BorderFactory.createSimpleBorder(new XYEdges(1, 1, 1, 1)));
        _tipo.setFont(Utils.getFont());

        FCLabelField lblTipo = new FCLabelField(_tipo_filtro, FIELD_VCENTER, false);

        String[] opcoes = new String[] { "BLA3", "BLA4", "BLA5", "BLA6"};
        _situacao = new ObjectChoiceField(null, opcoes, 0, FIELD_VCENTER) {
            protected void layout(int width, int height) {
                super.layout(width - 346, height);
            }
        };
        _situacao.setBorder(BorderFactory.createSimpleBorder(new XYEdges(1, 1, 1, 1)));
        _situacao.setFont(Utils.getFont());

        FCLabelField lbl = new FCLabelField(_filtro, FIELD_VCENTER, false);

        CustomButtonField btConsultar = new CustomButtonField("Submit");
        HorizontalFieldManager hfmButton = new HorizontalFieldManager(FIELD_VCENTER);
        hfmButton.add(btConsultar);

        HorizontalFieldManager hfm = new HorizontalFieldManager(FIELD_LEFT);
        hfm.add(lblTipo);
        hfm.add(_tipo);
        hfm.add(lbl);
        hfm.add(_situacao);
                  add(hfm);
...

I m waitting for more help.

Best regards, Rampelotti

The way I would approach this scenario is firstly by adding two fields of object list to a horizontal management.

Resize the fields until they are exactly where you want to be.

Once you did, then you can begin to add the label fields, centering, resizing and so on.

Do it step by step.

Also subtract 200 + pixels in width is not a good idea, especially on small devices.

Hope this helps

Tags: BlackBerry Developers

Similar Questions

  • How to watch two clips at the same time on the other, with an opacity of 50% each.

    How to watch two clips at the same time on the other, with an opacity of 50% each. It is confirmed that the position of the object even two clips of mergers.

    Thank you

    PPut a clip on top of another in the timeline panel. In the video Inspector reduce the opacity of the clip on top.

  • I can't have multiple files open at the same time! I need to compare the content from one to the other. How to display two files at the same time?

    I can't have multiple files open at the same time! I need to compare the content from one to the other. How to display two files at the same time?

    Hi sindres79946597,

    Open Acrobat Reader DC, navigate to the Edit-> Preferences-> General-> uncheck "Open Documents in the new tab in the same window.

    Now, reboot your system, when you open multiple PDFs that all will open in a new window so that you can easily compare.

    Kind regards
    Nicos

  • How to open two PDFs at the same time (for example on two related screens)? It was always possible in the previous version of the Adobe Reader software.

    How to open two PDFs at the same time (for example on two related screens)? It was always possible in the previous version of the Adobe Reader software. Now while one of them is open, I can't open the other, because it is hidden, and I have only shown in the taskbar as a thumbnail.

    Hi ewap51098943,

    You can disable this in the Edit menu-> preferences-> General

    Kind regards
    Nicos

  • Two RichTextFields on the same line

    I am writing two RichTextFields in the same line, but one of them with a font in bold and plain text for the other. I do this, but for some reason any the second richtextfield is not shown in my screen. I have no idea what I'm doing wrong...

    myFontNegrita = Font.getDefault () .derive (Font.BOLD, 16);
    myFont = Font.getDefault () .derive (Font.PLAIN, 16);
          
    hfmHoraInicio = new HorizontalFieldManager();
    labelInicioAplicacion = new RichTextField ("my text:", Field.READONLY |) Field.NON_FOCUSABLE);
    labelInicioAplicacion.setFont (myFontNegrita);
           
    textoInicioAplicacion = new RichTextField ("blablabla", Field.READONLY |) Field.NON_FOCUSABLE);
    textoInicioAplicacion.setFont (myFont);
           
    hfmHoraInicio.add (labelInicioAplicacion);
    hfmHoraInicio.add (textoInicioAplicacion);

    Add (hfmHoraInicio);

    Thanks in advance.

    I guess that the RichtTextField takes all the available horizontal space by default. Perhaps the style RichtTextField #USE_TEXT_WIDTH help?

  • How to have two copies of the same program to install on WIndows 7 and on the desktop

    «"" "Dear help forum:»»"»

    I am new to WIndows 7, but just have not found the right research
    How to get my answer from Microsoft/Windows 7 basic knowledge.

    I have two programs. There are two versions of the same program
    ('LACE') One is the version 4.0.1, and the other is Version 4.0.6.

    I wish I had one old continue to run (using a purchased
    Product key which I own and have for years).

    BUT there is a problem. The old and new programs are the
    same 'setup.exe '? Download 124 MB each. There are small but
    many corrections and changes in the new program, I am told, but
    they do not have add up to change the size in MB of the program.

    SO I'm in trouble when I'm trying to download the program, as
    It seems to be in WIndows 7, a small program that removes the
    size of the incoming download and informed me that I can not download
    a new that I have already one of this program is installed in the
    computer!

    He asks me if I want to "Uninstall" the previous version and then replace
    It is with a new one. I can't cancel the old version because she had a
    Product key that was told to me in the instructions that he could
    only be used 'once', to uninstall the program won't help
    me as I won't be able to continue to use this program once again, as the
    registration code could only be used once.

    I have a purchased code new, different program version 4.0.6.

    Is this a problem with WIndows 7? I already called/sent the
    company and they have no help and no solution for how these two programs
    are to run on the same computer at the same time.

    Can you please help me and provide instructions on how I load
    This program of "LACE" most recent second size 124 MB and even download
    name in the computer (replacing the automated duplicate program
    prevention installer routine), so I can have and use two copies of
    This program on the computer at the same time?

    During the creation of this issue, I had an idea of what will happen if I created a
    second Downloaded Programs folder to contain the program setup.exe inside
    and try the operation or the opening of this place. He did not like
    the program checked the computer for the first copies of the
    LACE and identified, he was always present in the computer and asked
    Once again if I wanted to remove it.

    Thank you very much!

    If this program is not designed for the execution of the two copies on a single installation of Windows, then you simply can't do.  No ifs, ANDS or goals.  You have never been able to do with any version of Windows, and apparently the creators of this program thinks there is no reason to do so, then you'll just have to choose one version or another.  I'm not familiar with the lace, but more recent versions programs usually include most of the older features while adding the most recent.  They sometimes make us learn new ways of doing things that make us less happy, but I'm afraid that's life in the world of computing.

    That said, I must mention that there may be alternatives that you might continue even if they are less obvious than what you suggested.  If you have the professional version or full edition of Windows, you can get XP mode free you can start Windows 7.  It normally happens in 15 to 30 seconds and you could install and run another version of your program under that.  If you do not either of these versions, you can invest in the Anytime Upgrade and do it available.  Upgrade Home Premium to professional is $ 90.

    The other alternative would be a dual-boot configuration where you could have two versions of Windows in separate partitions, so when you start your computer, you can select the one with the version of your program you want.  I think that the choice of the XP mode would be preferable because it would be so much easier to use, but these two options are available, if you want to continue.

    Good luck.

  • How to add two controls on the same form datagrid? I get the error message...

    Hello

    I have to add two controls on the same page datagrid. When I try to drag an another DataGrid in the components window, it says "an element with that name already exists in the library."

    How can I add multiple controls on the same page datagrid?

    Kind regards.

    _data2 = new XML (event.target.data2);

    should be

    _data2 = new XML (event.target.data);

    (actually, it's better if it was

    _data2 = XML (event.target.data);

  • How to open two files in the same screen

    I have a new HP TS 15 W8.  I need to have two files or programs at the same time - for example a PDF from a foreign language and a word for me file to translate.  or related to the use of the project manual and a project file.   but I can do one or two others.  in the past, seems to have been fairly automatic, but now is not.  can someone explain how to do this?

    I fear that it does not really help.  If I press the Windows key it goes back on the desktop, but there is simply no way to take the file I need and its size and place it next to the project folder I wanted to relate to.

    Hello

    If you use 1 user interface modern app and 1 desktop application to open the 2 files, perform the following steps.

    1. open the desktop application.

    2. press the Windows key to display the start screen and open the user interface modern App. use the slider to turn the app on part and on the other screen (move the cursor to the top of the screen and drag the app to share and sides of the screen).

    3. press Ctrl + Windows key + Tab to display the Switcher App click on the desktop application. This application will Snap to the opposite side of the screen.

    (Note: you must have at least 1366 x 768 screen resolution to use the component feature snap-in)

    Concerning

  • How to get two outputs at the same time?

    Hello

    I use the PCIe6351 DAQ card to generate two signals separately. This product has two exits, so I thought that I can use both at the same time, but when I run the code it gives an error: "the spesified resource is reserved. I just want to know if it is possible for me to use both outputs together at the same time or not? If so, would you please guide me what should I do to solve the problem?

    Thank you very much

    Soran

    Great! This works. I appreciate your help

  • How to create two employees with the same name as the vendor record?

    Hi all

    We must create a vendor for the employee record, so that we can issue pretty invoice for cash payment. If there are 2 employees with the same name, how can we create records of supplier for these 2 employees? The system does not have the name of the provider in duplicate.

    Please notify.

    Kind regards
    HY

    Hello

    In R12, it is possible to create 2 employee with the same name but with a different number.
    And it is also possible to create these 2 employees as suppliers in Payables.

    HTH,
    Vik

  • How to view two documents at the same time

    Side-by-side view?

    Is it possible to display 2 documents at the same time in a side-by-side format?

    In the taskbar so that you have both open documents select the first document and then hold down the CTRL key and click on document 2.  Right-click on the 2nd document and choose "vertical mosaic".

  • How to have two tabs at the same time on the screen... like split in the half

    My daughter once divided the screen into two tabs by dragging, I forgot just how she did... need help

    Breaking of Windows,

    http://Windows.Microsoft.com/en-us/Windows7/products/features/snap

    http://Windows.Microsoft.com/en-us/Windows7/arrange-Windows-side-by-side-on-the-desktop-using-snap

    You can also click with the right button on your taskbar and click on next.

  • How to open two projects at the same time?

    I have more than 40 project files. Stadium.

    I'm finishing my work, but I forgot something. I did not notice that I've lost a few animation keyfreme. I didn't in the 30 draft and I'm now over more than 40 years. I did a lot of work and I can't go back to 30 projects. I don't want to do this from the beginning, so let me COPY my keyfremes of 3o to 40 project. For this I need to have 2 programs opens (to copy project keyfremes 30-40 project). But I can't open two After Effects.

    How can I copy my keyframes on the timeline?

    To copy ALL this in a turn and paste also:

    X4HYsAo.png

    Import your another project in the works project.

    Mylenium

  • How to import multiple items in the same line in Framemaker structure (i.e. no carriage return between elements).

    I have a successful import process will now (DTD, EDD, ReadWriteRules and model) important a number of items, but each on a separate line. I now need to import three items of a line on a single line. How can I configure up to do?

    @

    Dear wild,

    A container, a structured document element can be a paragraph element, which contains one or more paragraphs FrameMaker complete (elements corresponding to the chapters, the titles and the list items, for example, are usually elements of paragraph), or an element of text range, with content that includes a portion of a paragraph. A DSP didn't need to identify the paragraph being paragraphs default containers. Make you an element a range of text with a text format rule that specifies TextRangeFormatting.

    In your case, if you have a wrapper element that contains three items that you want to appear on a single line, in ESD, add a rule for three items inline text format that specifies TextRangeFormatting; specify the overall paragraph formatting in the definition of the element for the wrapper. If you do not have a wrapper, however, the overall paragraph will inherit formatting regardless of the container element is; root element of the document or a major division as a chapter or a section, perhaps the containing element. If this formatting is not what you want here, you can leave the elements 'inline' as a separate subparagraph so that you can specify their implementation form, but you the first two counts run (which is made in the Placement property paging properties).

    -Lynne

  • Two RadioButton on the same line with any idea...

    Hello

    Can I add two RadioButton singel online...

    I m using HorizontalFieldManager with him

    but only the first button is visible... give me a solution simple and good for this please help me.

    Thank you

    Himanshu

    Beginner

    Please find the Code below and try it and let me know...

    radioButtonGroup = new RadioButtonGroup();
    
            radioButtonField = new RadioButtonField("Radio 1", radioButtonGroup,
                    true, 0) {
                protected void layout(int arg0, int arg1) {
                    setExtent(Display.getWidth() / 2, arg1);
                    super.layout(Display.getWidth() / 2, arg1);
                };
            };
            radioButtonField1 = new RadioButtonField("Radio 2", radioButtonGroup,
                    false, 0) {
    
                protected void layout(int arg0, int arg1) {
                    setExtent(Display.getWidth() / 2, arg1);
                    super.layout(Display.getWidth() / 2, arg1);
                };
    
            };
    
            HorizontalFieldManager hfmFieldManager = new HorizontalFieldManager() {
                protected void sublayout(int maxWidth, int maxHeight) {
                    setExtent(Display.getWidth(), maxHeight);
                    super.sublayout(Display.getWidth(), maxHeight);
                }
            };
    
            hfmFieldManager.add(radioButtonField);
            hfmFieldManager.add(radioButtonField1);
    
            add(hfmFieldManager);
    
            add(new LabelField("This label is below the two radio buttons",FOCUSABLE));
            add(new ButtonField("Click ME!"));
    

Maybe you are looking for