I've read the article Understand SWT Layout, but I cannot find a way to put several buttons in a container in right-to-left way.
How can I do this?
Composite is an ancestor of every SWT class to which you can add widgets, including Shell . For that reason, you can think of a Composite as being simply the working area of a Shell , without the styles associated with the aspects of Shell that make windows—the titlebar, control menu, etc.
public Shell(Display display) Constructs a new instance of this class given only the display to create it on. It is created with style SWT.
Right to left can be achieved through SWT.RIGHT_TO_LEFT flag passed to your container element. For example if you apply a RowLayout to a Composite, create Composite this way:
c = new Composite(shell, SWT.RIGHT_TO_LEFT);
Note that RTL is only implemented in Windows and Linux. Mac support is too limited (is only widget-level, not container-level).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With