java - how to fix the order of the buttons in SWT? -


i have scroller 2 buttons

how can set order of buttons in same raw , not each control : button scroller , button in different row

    fcomposite= new composite(composite, swt.right_to_left);     griddata layoutdata= new griddata(swt.fill, swt.right_to_left, true, false);     fcomposite.setlayoutdata(layoutdata);     layout= new gridlayout(1, false);     layout.marginheight= 0;     layout.marginwidth= 0;     layout.horizontalspacing= 0;     layout.verticalspacing= 0;      fcomposite.setlayout(layout);      display display = parent.getdisplay();     shell shell = parent.getshell();      button button = new button(fcomposite, swt.left);     button.settext("two"); //$non-nls-1$     button.setimage(display.getsystemimage(icon_1));          final scale scale = new scale (fcomposite, swt.border);     rectangle clientarea = fcomposite.getclientarea ();     scale.setbounds (clientarea.x, clientarea.y, 200, 64);     scale.setmaximum (5);     scale.setpageincrement (1);     scale.setselection(5);      button rbutton = new button(fcomposite, swt.right);     rbutton.settext("two"); //$non-nls-1$     rbutton.setimage(display.getsystemimage(icon_2));    

did read article swt layouts posted in 1 of other questions?

the display , shell first things create. after can add things shell.

your problem based on fact, created gridlayout 1 column. widgets below each other.

layout= new gridlayout(1, false); 

the first parameter number of columns. set 3 three columns.

please read documentation of layout , article: understanding layouts in swt before asking further questions. you.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -