简体   繁体   English

SWT RowLayout从右到左?

[英]SWT RowLayout right-to-left?

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. 我已经阅读了文章了解SWT布局 ,但我无法找到一种方法将几个按钮以从右到左的方式放入容器中。

How can I do this? 我怎样才能做到这一点?

Right to left can be achieved through SWT.RIGHT_TO_LEFT flag passed to your container element. 从右到左可以通过传递给容器元素的SWT.RIGHT_TO_LEFT标志来实现。 For example if you apply a RowLayout to a Composite, create Composite this way: 例如,如果将RowLayout应用于Composite,则以这种方式创建Composite:

c = new Composite(shell, SWT.RIGHT_TO_LEFT);

Note that RTL is only implemented in Windows and Linux. 请注意,RTL仅在Windows和Linux中实现。 Mac support is too limited (is only widget-level, not container-level). Mac支持太有限(只是小部件级别,而不是容器级别)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM