Reputation: 123
Do we have any specified css for coloring the selecfield in sencha touch2?
My selectfield code as of now is as follows:
{
xtype: 'selectfield',
options: [
{text: 'AI', value: 'first'},
{text: 'AK', value: 'second'},
{text: 'BR', value: 'third'}
]
}
Upvotes: 0
Views: 3078
Reputation: 2051
You can use a separate css class for your select field. Use " css: 'yourclassname' " after your "xtype" value and define the class as
.yourclassname{ background-color:#000;color:#fff;font:normal 12px Arial;}
So your code will be
xtype: 'selectfield',
cls: 'yourclassname',
options: [
{text: 'AI', value: 'first'},
{text: 'AK', value: 'second'},
{text: 'BR', value: 'third'}
]
thanks
Upvotes: 3
Reputation: 1993
Please check: http://docs.sencha.com/touch/2-0/#!/guide/theming
Using Sass & Compass is the right way for styling your app!
Upvotes: 0