Question

Currently I have to set rtl=ture on all widgets that have no RTL parents. How can I set rtl=ture for all widgets?

Was it helpful?

Solution

If you are using a viewport, simple set rtl=true on the Viewport - this is what the examples show. However your question indicates that you have distributed widgets in your application.

I don't know of any documented way of doing this for distributed widgets. However, if you have a look at the source code, more specifically for the root object Ext and Ext.rtl.AbstractComponent, you will find that there is a private default property for this: Ext.rootHierarchyState.rtl .

To default your widgets to rtl, set Ext.rootHierarchyState.rtl = true; in your initalization code.

Disclaimer: this is marked as a private property, thus not intended for modification, so this solution may easily break between versions of ExtJs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top