如何在ExtJs Combo.Is中顯示圖標和顯示字段Extjs組合中有任何擴展名。請提供一些樣品。ExtJs Combo中的圖標
7
A
回答
3
5
對於ExtJS4與getInnerTpl方法添加listConfig到ComboBox:
xtype: 'combobox',
anchor: '100%',
listConfig: {
getInnerTpl: function(displayField) {
return '<img src="/images/icons/{id}.png" class="icon"/> {' + displayField + '}';
}
},
name: 'type',
fieldLabel: 'Group Type',
displayField: 'label',
hiddenName: 'type',
queryMode: 'local',
store: 'group.Types',
valueField: 'id'
0
另一種方式,我認爲是可以提高它但對我很好:
,store: new Ext.data.ArrayStore({
id: 0,
fields: [
'lang', 'desc','url'
],
data: [['CA','Spanish','es.gif'],['VA','Valencian','va.gif']]
})
,tpl : '<tpl for=".">'+
'<tpl if="0==0"><div class="x-combo-list-item" ><img src="../img/{url}"> {desc}</div></tpl>'+
'</tpl>'
相關問題
- 1. ExtJs Combo selectedValue
- 2. 在extjs combo中感覺困難
- 3. extjs combo override:爲什麼要定義this.addevents()?
- 4. ExtJS Combo默認值返回null
- 5. Extjs Combo diplay value - 如果未找到值
- 6. Ext JS Dependent combo box
- 7. EXTJS中的圖片/圖標樹代碼
- 8. 如何在SWT Combo中顯示文字和圖標?
- 9. 如何擺脫extjs樹中的圖標
- 10. 如何刪除Extjs-6中的Extjs試用版圖標?
- 11. SmartGWT ComboBoxItem - Combo中的項目未在選擇列表中標記
- 12. Flex combo box labelfunction
- 13. 圖標和圖標在ExtJS中的文件夾
- 14. 設置GMapPanel中製造商圖標的圖標大小,ExtJS
- 15. ExtJS 4樹形圖標
- 16. ExtJS圖表標籤問題
- 17. EXTJs操作列圖標
- 18. Extjs網格圖標行對齊中心
- 19. Killfocus for Combo Box(DDL)
- 20. combo getSelectedItem,但然後
- 21. FluentValidation Rulefor(...閱讀COMBO)
- 22. 標題中的按鈕ExtJs
- 23. ExtJS的4添加加載圖標
- 24. vaadin-combo-box/vaadin-combo-box-overlay更改背景顏色/ Polymer API
- 25. extjs中的瀑布圖
- 26. 當單擊extjs網格動作列中的圖標時,需要更改圖標
- 27. 軸標籤在ExtJS中的圖表中不可見4
- 28. ExtJS 3 - 總是在GridPanel列標題中顯示菜單圖標?
- 29. ASP.NET combo selectedIndexChanged事件不叫
- 30. Windows 7 SWT COMBO問題