PDA

View Full Version : Using Ext window and RTL support



Gil Hananya
22 Aug 2011, 6:13 AM
Hi All,

I have an Ext window which i need to be with direction RTL.
I have set the bodyStyle of the window with 'direction:rtl' and it worked for most ot the window items except for text fields with labels.
The label is still at the left of the text field and not at the right as i want it to be.
Is there something i'm missing?

Thanks,

skirtle
22 Aug 2011, 8:57 PM
Official support in ExtJS for RTL was due in 4.1 but has been pushed back.

RTL is difficult and I don't claim to be an expert. I think I've got it working but I have no idea if this is the correct way to do it.


.win-rtl {
direction: rtl;
}

.win-rtl .x-form-item-label {
float: right;
}


new Ext.window.Window({
cls: 'win-rtl',
height: 300,
width: 300,
items: [
{xtype: 'textfield', fieldLabel: 'Label'}
]
}).show();

If that doesn't work for you could you post some of your code? Make sure you wrap it in code tags (# button on the editor toolbar).