StackLayout - button on the same line

Hello

I have always a problem with button and stacklayout: I can't have different button on the same line.

A simple code like:

Page {
            Container {

                layout: StackLayout {
                    orientation: orientation.LeftToRight
                }
                verticalAlignment: VerticalAlignment.Top
                horizontalAlignment: HorizontalAlignment.Fill

                Button {
                    id: button1
                    text: qsTr("button1")
                    layoutProperties: StackLayoutProperties {}
                    horizontalAlignment: HorizontalAlignment.Left
                    verticalAlignment: VerticalAlignment.Top
                    preferredWidth: 20

                }

                Button {
                    id: button2
                    text: qsTr("button2")
                    layoutProperties: StackLayoutProperties {}
                    horizontalAlignment: HorizontalAlignment.Center
                    verticalAlignment: VerticalAlignment.Top
                    preferredWidth: 20
                }

                Button {
                    id: button3
                    text: qsTr("button3")
                    layoutProperties: StackLayoutProperties {}
                    horizontalAlignment: HorizontalAlignment.Right
                    verticalAlignment: VerticalAlignment.Top
                    preferredWidth: 20
            }
        }
}

often I have my button to the location of horizontal line, but vertically, each button is on a different line...

Is there someone who could tell me why?

Thank you

Container{
    layout: StackLayout{
    orientation: LayoutOrientation.LeftToRight
    horizontalAligment: HorizontalAligment.Fill

    Button{text: "One"}
    Button{text: "Two"}
    Button{text: "Three"}
}

She hope it helps

Tags: BlackBerry Developers

Similar Questions

  • Radio buttons on the same line

    Hi all

    Somebody kwons how to set the radio buttons on the same line? I use the Application Express 3.0.1.00.07.

    TKS,
    Eric

    Hello

    Edit your article.
    List box of values you have the attribute columns
    >
    Apply to checkboxes and radio groups. Sets the number of columns to use to display values defined in the list of values. By default, all values appear in a column.
    >
    http://download.Oracle.com/docs/CD/B32472_01/doc/AppDev.300/b32471/UI.htm#BABDGJFI

    Kind regards
    Jari

  • How to put the button on the same line

    I am having some problems with the buttons. I have the main screen with a verticalmanagerfield parent, who has two sons a richtextfield and an editfield (these two are the same on both of the gpsdemo)

    I want to put 3 buttons under the sons of two field and these 3 buttons that we're going to be son of verticalmanagerfield, but I can't put them on the same line

    I'll show you two pictures what I mean

    first image: I see now

    second image: what I want

                HorizontalFieldManager hfm = new HorizontalFieldManager()
                {
                    protected void sublayout(int width, int height)
                    {
                        Field field;
                        int numberOfFields = getFieldCount();
                        int x = 0;
                        int y = 0;
                        width=250;
                        height=50;
    
                        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 += 120;
                        }
                        setExtent(width, height);
                    }
                };
    
                 hfm.add(new ButtonField("Button 1"));
                 hfm.add(new ButtonField("Button 2"));
    
  • 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

  • Region HTML - element, TextBox and Button on the same line

    Hello

    I have a search page:
    POINT region HTML with a search box and a button (created in the section of button).


    How can I align the search box and the key? (on the same line)
    I see that the choice for the button to align at the top or on the button of the section. If the button is under or above the search box.

    Or maybye is possible to hide the searbox and button and create a table html for alignment?


    I work with Apex 3.1.2.00.02
    Region: HTML
    Theme: Dark blue:
    Model: region of report

    Thank you

    Roseline

    Roseline,

    Create a new button and select the Create button as an element and not in the position of the region.

    Option buttons behave differently to the buttons of the Position of the region.
    If you are wanting to use the button 'Submit' page, you need to change the button to target is a URL and add javascript:doSubmit('YOUR_REQUEST_VALUE');

    Gus...

    AWARDS: Don't forget to mark messages USEFUL or CORRECT on the forum, not only for my answers, but for everyone!
    ;-)

  • After you select list, and button on the same line

    Just a minor matter cosmetic a user has raised.

    I have a couple of selection lists that I have on the same line by setting the 'start on new line' on no. Is it possible to get a button to sit on the same line (i.e. within the same line of the table or cell as Select lists)?

    West Indies,

    When you create a button, the second page of the wizard is the option you're looking for: 'create a button displayed among the elements of this region. "

    Just keep in mind that these buttons don't submit by default where as area buttons can also redirect without submitting it.

    Kind regards
    Dan

    http://danielmcghan.us
    http://sourceforge.NET/projects/tapigen

  • The orange Firefox button and the Navigation toolbar is on the same line

    Someone interfered with my Firefox settings and goofed a bit. Now the orange Firefox button and the Navigation toolbar are on the same line/line, as shown in the image below. Can you help me with the Firefox orange button at the top of the Navigation toolbar (as usually is the case)?

    http://PUU.sh/4NoO8.jpg

    Thank you very much! I had this same problem. I'd rather have my tabs at the top, in line with the orange. For some reason any that an add-on reset my 'browser.tabs.drawInTitlebar' to false, which looked horrible and wasted a whole bar of space by the presence of a large space empty on the top of my screen. It fixed my problem!

  • The orange button Firefox used to be on the same line as tabs, how to move the tool bar of tabs to be on the same line as before?

    I now have the Firefox button orange on its own line at the top of the page, but it used to be on the same line as the toolbar tabs which takes less space. I know what happened before I put right but cannot get back them now on a single line.

    Make sure that you have selected cover via Firefox > Options.

    You also have to maximize the window to have the tab bar and the Firefox button in the title bar.

    You can also set the pref browser.tabs.drawInTitlebar Boolean to true on the topic: config page.

  • Need space between buttons displayed on the same line

    Hello - I have 3 buttons html:

    Cancel
    query
    create

    They must be displayed on the same line, in the regions of button. (They're in)
    the lower-left corner of the page; right now I'm on the région #CREATE #.)

    The position of cancel and the query is fine... but I need space (approximately that of a button
    Worth) between query and create. Can not know how to do this.

    Ideas?

    Thank you
    Carol

    Hi Carol,.

    It might be interesting to look at model in your region under the shared components > models > region change the model.
    You should see the place holders of section definition for your buttons etc. #CREATE # CANCEL #. I suggest that you make a copy of the model and then play with it maybe just add another tag td which is empty.

    IF you need help with it just post your definition here and I'll try and help you.

  • view edit history file on the same line as the Favorites bar

    I used customize to try to remove: file edit view etc. in the bookmarks toolbar I have somehow manged to get on the same line. I don't want it and want to remove it.

    Hi, try clicking on settings by default, as shown in the controls, buttons, and Toolbars Customize Firefox. There are also instructions to remove the bar of menus (file, editing, display etc.).

    If your question is resolved by this or another answer, please take a minute to let us know. Thank you.

  • How can I leave toolbars 2 (or more) share the same line?

    I would like to have 2 or more toolbars that do not have an entire line share the same line (such as MS Word or Acrobat Reader).
    Is this possible?

    See this KB article - https://support.mozilla.org/en-US/kb/customize-firefox-controls-buttons-and-toolbars

    Experiment with these toolbars and see what is possible with these specific toolbars. Firefox has this capability, most of the time, but each developer toolbar must provide the coding of their add-on to enjoy what Mozilla has integrated into Firefox.

    My guess is that a well made toolbar add-on has three times the code that has a toolbar add-on minimum effort. Too many developers toolbar these days take the easy way and do not have their add-on to be "flexible".

  • Positioning of elements on the same line

    Hello world

    Currently, we are trying to solve the problems of layout at the APEX 4.2, but it is very difficult to do, I hope someone can help me.

    We have 4 items that must be on the same line
    (1) key popup LOV
    (2) button
    (3) radio button
    Text box 4.

    Currently, all the elements are on the same line, but they look like | B | C | D and we want to add spaces between them is no longer legible. I already tried to use the collspan / rowspan, but he does not have what I want.

    The model that we used in 4.2 is generator of blue and we used the model of region of reports.

    I hope someone can help me with this

    Thanks a lot for your help!

    Haimertje16

    Enter the message text item. Width in px, so maybe try a 100px and then reduce if there's more.

    Vivek

  • Cannot restart or refresh my iPhone 7 from the "home" button and the sleep/wake button at the same time

    I'm having difficulty trying to restart and update my iPhone 7 using the Home button and the sleep/wake button at the same time, when I do my phone takes a screenshot of the home screen.

    Should I turn off my Touch ID?

    Basically my home button button and / standby works not together at the same time.

    You need hold the House and turn off the button for 20 seconds, until the Apple logo appears.

  • What happened to the insertion function. It was on the same line as file

    What happened to the insertion function? It was on the same line as the files, tools, etc. He's gone. If you want to insert a jpg you sent as an attachment. I have read through the help files and that you can't find the answer. I want my old Thunderbird back! Newer is not always better.

    I suspect that you have lost the Mail composition toolbar. Open an entry window, press and hold the < alt > key, type v and check the box for the mail toolbar. I would also allow the Menu bar while you are there.

    Another possibility, if the Insert option is missing in the mail toolbar, is that it is spent in composition in plain text mode. Open the settings page of the account assigned by right-clicking on the account in the left pane, select Composition & addressing and tick the box labelled "Dial using the HTML format".

  • How can I combine the navigation bar and the menu bar on the same line to save space?

    V29 Firefox seems to be a huge not backward in customization. I need to save room for the content so already I disabled the tabs and combined in the menu bar and the navigation bar on the same line. The url space is too long anyway. Now with v29 all my customization is gone and I can't get it back. I can move me is more points on the navigation bar to combine it with the menu bar. Why this was done? It limits only my ability to customize my browser? I'm very frustrated that you had a great browser and ruined.

    You should see Classic theme restaurateur, it contains many parameters. This module applies to customize Firefox 29. https://addons.Mozilla.org/en-us/Firefox/addon/classicthemerestorer/

Maybe you are looking for