PDA

View Full Version : rtl is not working for combobox



sandy52
13 Feb 2014, 10:21 PM
Hi,
I am trying to change the layout of combobox from left-to-right to right-to-left but its not working. need a help from you guys :((

thanks & regards,
sandy

mdnaveed42
13 Feb 2014, 11:14 PM
Hi,

Need to check for proper solution, for quick fix check the below code..



// The data store containing the list of states
var states = Ext.create('Ext.data.Store', {
fields: ['abbr', 'name'],
data : [
{"abbr":"AL", "name":"Alabama"},
{"abbr":"AK", "name":"Alaska"},
{"abbr":"AZ", "name":"Arizona"}
]
});


// Create the combo box, attached to the states data store
Ext.create('Ext.form.ComboBox', {
fieldLabel: 'Choose State',
store: states,
queryMode: 'local',
displayField: 'name',
valueField: 'abbr',
rtl: true,
baseCls: 'combo-rtl',
renderTo: Ext.getBody()
});
// CSS
.combo-rtl ul.x-list-plain {
direction: "rtl";
}


Thanks,
Md Naveed
\m/

AkshayKalbhor
14 Feb 2014, 12:05 AM
Probably you have not added the "ext-all-neptune-rtl.CSS" in your HTML file. Add it and it should be done!! B)

sandy52
14 Feb 2014, 2:32 AM
Hi Naveed,

thanks for the help

AkshayKalbhor
16 Feb 2014, 10:23 PM
Hi.

Did my solution work? were you able to solve the problem?:-?

sandy52
16 Feb 2014, 10:36 PM
Hi,
as per given naveed solution i created one class and write a style for that class as a direction=rtl, it work!!\:D/