Reputation: 107
I have a grid panel with a checkbox added in its header. How can I stylize the checkbox?
Ext.define('MyApp.view.SalesTour', {
extend: 'Ext.grid.Panel',
controller: 'salestour',
title: 'List of SalesTour',
iconCls: 'x-fa fa-handshake-o',
store: 'MyApp.store.SalesTourStore',
columnLines: true,
header:
{
xtype: 'header',
titlePosition: 0,
defaults: {
margin: '0 10px'
},
items: [
{
xtype: 'checkbox',
//labelStyle: 'color: #FFFFFF',
//style: 'color: #FFFFFF',
boxLabel: 'Hide converted',
name: 'hideConverted',
inputValue: true,
checked: true
}],
listeners: {
beforerender: 'onBeforeHeaderRender'
}
},
columns: [
{
...
...
I tried using labelStyle and style properties unsuccessfully... I would expect to see the checkbox and its label of white color.
Some suggestion, please? What can I do?
Thanks a lot!!!!
Upvotes: 0
Views: 205
Reputation: 702
You could add css classes to the checkbox.
For Example
You could create a css class
.boxLabel-font-white {
color: white;
}
And add the class to the config boxLabelCls to color the boxLabel for the checkbox.
https://docs.sencha.com/extjs/7.0.0/classic/Ext.form.field.Checkbox.html#cfg-boxLabelCls
There are many more cls-configs you could use: https://docs.sencha.com/extjs/7.0.0/classic/Ext.form.field.Checkbox.html
I hope that helps
Upvotes: 1