我有下面的代碼:改變selectfield寬度煎茶
Ext.create('Ext.form.Panel', {
fullscreen: true,
items: [
{
xtype: 'fieldset',
title: 'Select',
items: [
{
xtype: 'selectfield',
label: 'Choose one',
options: [
{text: 'First Option', value: 'first'},
{text: 'Second Option', value: 'second'},
{text: 'This is a long text to test the selectfield', value: 'third'}
]
}
]
}
]
});
我想改變selectfield寬度,因爲第三個選項是很長。
是的,但是這會在收縮時改變選擇區寬度。當這些選項被展開時,它將返回到原來的大小 – jos11
在這種情況下,使用大概可以使用CSS: div.x-select-overlay {width:15em!important} –
謝謝我已經使用 .x-select-overlay { 最小寬度:25em!重要; } 它的工作原理 – jos11