設定 comboBox 下拉選單 組件 ( 顯示欄位內 ) 的 字型 與 尺寸

// comboBox.textField.setStyle("embedFonts", true); // 不常用也不實際
comboBox.textField.setStyle("textFormat", myFormatWhite);


設定 comboBox 下拉選單 組件 ( 下拉欄位 ) 的 字型 與 尺寸

// comboBox.dropdown.setRendererStyle("embedFonts", true); // 不常用也不實際
comboBox.dropdown.setRendererStyle("textFormat", myFormatBeige);


但是 ( 顯示欄位內的 textFormat 設定一經 ComboBox.removeAll() 就會跑掉 ) 解決方法為在 removeAll() 之前加上 .prompt = '?' 如下 :

comboBox.prompt = "請選擇"; efault value that won't show in the dropdown// 
comboBox.removeAll() ; 
comboBox.addItem({...}) ;

就可以了。

arrow
arrow
    全站熱搜

    聆六禽 發表在 痞客邦 留言(0) 人氣()