View Full Version : hbox/column ltr and rtl

21 Jul 2009, 12:58 AM

I'm building an app that needs to work both both for ltr and rtl layouts.
I'm using css to change specific styling of components but I wonder how to do it for layouts.
I'm currently using hbox. Is it possible to change the layout from ltr to rtl?
For example, in the Flex:ratio example (http://www.extjs.com/deploy/dev/examples/layout/hbox.html), changing to rtl should move button4 to the left and button1 to the right while preserving the ratios.

Because hbox use absolute positioning I think the only way to do that is to change the order of items in the config but that will lead to dirty code. Another way is to put a plugin that reverse the items order.

With Column layout it is possible to do that with css because it uses floats but hbox is much more powerful in general unless they serve different purposes and I'm missing something.

Is there a better way to handle it and should I use box or column layout?

21 Jul 2009, 1:09 AM
The only way to get RTL support in HBoxLayout would be to modify the code.

If you want to be able to support RTL without code changes, you are stuck with ColumnLayout.