PDA

View Full Version : ExtJS Custom Checkbox field



apurva_mistry
10 Aug 2014, 10:53 PM
Hi all,

I have a requirement of creating a custom checkbox field as shown below:

49934

Do you think it is possible to use the existing checkbox class and just manipulate it using css? If not, what could be other alternatives?
Note: the behaviour is exactly the same as a normal checkbox.

Regards,
Apurva

sarasa
11 Aug 2014, 1:53 AM
Hi,

You can override the default css with the new background image:


.x-form-checkbox-default {
background: url(images/form/checkbox.png (https://extjs.cachefly.net/ext/gpl/5.0.1/packages/ext-theme-crisp/build/resources/images/form/checkbox.png)) no-repeat; //replace with new image
}

You might also need to position it properly, as the base css use a single image for checked and unchecked state controlled through positions.