-
17 Jan 2013 2:36 AM #1
Unanswered: Custom CSS (.x-boundlist-item) override in ExtJS combobox
Unanswered: Custom CSS (.x-boundlist-item) override in ExtJS combobox
Hi,
I am trying to implement multiSelect combobx with checkbox selection. PFB the snapshot :
Attachment 41332
I have usedin combobox. And in ext-all.css, have putCode:listConfig : { baseCls: 'z-myboundlist' },
to modify css and place the checked image of checkbox in background, when that particular combo box list is selected. It is working fine as you can see the checkbox checked in the above diagram.Code:.z-myboundlist-selected { }
However, what I need is an unchecked checkbox image in the remaining list items within the combo box. I addedin ext-all.css, but it is not working.Code:.z-myboundlist-item {}
When I do an inspect element in the combo box list items, I get this :
I want to know, why ''.z-myboundlist-item' is not getting added in class, and still 'x-boundlist-item'is being shown.Code:<li role="option" class="x-boundlist-item">South Korea</li>
I cannot add the unchecked chekbox image in x-boundlist-item class, since it will be added in all the combo box instances in the page. I want it to be specific to a single specific combo box.
Please help.Thanks,
Ronz
-
18 Jan 2013 2:16 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3161
First, you shouldn't edit any CSS or JS file that comes with the framework. You should only use your application files.
To specify what class is on each list item then you should use the itemCls config instead of the baseCls config.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Jan 2013 7:06 AM #3
Ok. Thanks for the information.
I did not find itemCls config for combobox. How shall I implement the same. Any demo/code ?Thanks,
Ronz
-
19 Jan 2013 11:48 AM #4
Combobox's drop down is an instance of an Ext.view.BoundList. You can set configs for a combobox's drop down using its listConfig.
The itemCls can be be configured there.
Code:listConfig: { itemCls: 'my-item-cls' // ... any other boundList configs }



Reply With Quote