您的位置:首页 > 其它

sencha-touch-1.1-selectfield(combobox)如何设置默认选项

2011-12-15 16:53 417 查看
Sencha Touch 交流 QQ 群 224711028

1.将value为grid的option设置为默认项

Ext.getCmp('viewPortSelect').setValue('grid');
2.从controller覆盖原有option
Ext.getCmp('theSelect').setOptions(
[   {text: 'First Option',  value: 'first'},
{text: 'Second Option', value: 'second'},
{text: 'Third Option',  value: 'third'}
]);


参考:http://stackoverflow.com/questions/7595669/how-to-make-the-default-text-in-a-select-field-grey-like-the-placeholder-for-tex
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: