newsanti Posted May 1 Share Posted May 1 with UnimComboBox1 do ClientEvents.UniEvents.Values['beforeInit'] := 'function beforeInit(sender, config) {'+ ' config.listConfig = {'+ ' tpl: new Ext.XTemplate('+ ' ''<tpl for=".">'+ ' <div class="x-boundlist-item" style="{[this.check(values)]}"'+ ' >{val}</div></tpl>'''+ ' ,{ disableFormats: true,'+ ' check: function(values) {'+ ' return "font-family: Noto Serif Thai;"'+ ' }'+ //end..check ' }'+ ' )'+ //end..XTemplate ' }'+ //end..listconfig '}'; //end..beforeInit Not Work. https://fiddle.sencha.com/#fiddle/1bpq&view/editor Ext.application({ name : 'Fiddle', launch : function() { // 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', renderTo: Ext.getBody(), // Mark records with abbr: "AL" with red color tpl: '<tpl for=".">' + '<div class="x-boundlist-item" style="font-family: Noto Serif Thai;" >{name}</div>' + '</tpl>' }); } }); Mobile Combobox.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 3 Share Posted May 3 @newsanti ItemList: procedure TMainmForm.UnimFormCreate(Sender: TObject); begin with UnimComboBox1 do JSInterface.JSConfig('itemTpl', ['<span class="x-list-label" style="color:green; font-size:14px; font-style: italic;">{val:htmlEncode}</span>']); end; 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.