문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top