-
13 Apr 2012 12:06 PM #1
Answered: How to change the selected item color for the list?
Answered: How to change the selected item color for the list?
Hello,
I have several cards that display several different lists. When the item in the list has been selected, the background color in the selected item will be changed to default blue. How can I change the background color for selected item in each list in each card?
My code is (for one list)
{ xtype: 'list',
store: 'mystore',
itemTpl: '<div class="x-list-normal, x-list-item,x-item-selected, x-list-item-label" style="background-color:white">{myvariable in the list} </div>'
}
This doesn't work, the selected item always has the default blue color in backgroud.
P.S. I want to change in different colors, not only one which is default blue to something.
Anyone has any suggestions? Thanks.
Edward
-
Best Answer Posted by Rhoover
You'll be able to do this through the theming framework:
http://www.sencha.com/learn/theming-sencha-touch/
Specifically, you'll want to change the listitemselect class thusly
To have a different color on different lists, you'll have to set up a cls within each config object afaik.Code:.listitemselect { background: $my_new_gradient; text-shadow: $my_new_stunning_effect; }
-
15 Apr 2012 5:35 AM #2
You'll be able to do this through the theming framework:
http://www.sencha.com/learn/theming-sencha-touch/
Specifically, you'll want to change the listitemselect class thusly
To have a different color on different lists, you'll have to set up a cls within each config object afaik.Code:.listitemselect { background: $my_new_gradient; text-shadow: $my_new_stunning_effect; }
-
16 Apr 2012 10:57 AM #3
Thank you Rhoover. I got it!


Reply With Quote