[2.x] Tri-state checkbox and themed checkbox and radio
I know several of you have been waiting for this extension:
Tri-state checkbox and themed checkbox and radio components:
The attachment contains all needed files and an example.
Ext.ux.form.Radio currently ONLY works with the ext-base.js adapter.
- TriCheckbox is actually a multi-state checkbox. You can supply values and checkedCls arrays in the config with values and CSS classes for every state.
- Does somebody have better looking grayed checkbox images?
Last edited by Condor; 8 Mar 2008 at 7:36 AM.
Reason: Added TriCheckbox
How will this play under a non-Ext theme (eg Slate)?
The checkbox images are blue'ish. You might want to change them to gray.
The CSS also assumes a line-height of 13. For a smaller line-height you will have to adjust the CSS and the images, for a bigger line-height you can just add margins in the CSS.
I was reading the Ext roadmap thread and noticed the request for tri-state checkboxes.
Since I already made the themed checkbox adding tri-state support wasn't that hard.
(I updated my original post with the new code)
Excellent work Condor
Looking at the screen shots I do not understand how the tri-state will behave. Going by another Winform library I reckon the most intuitive behavior is:
Uniform mid-dark grey block.
Three clicks should cycle through those 3 states. Is this how the new Ext implementation works.
Originally Posted by SeaSharp2
The only problem is that I don't have good images of a grayed checkbox.
If somebody could provide those I would gladly replace my images (I need normal, focussed, down and disabled state images).
Just wanted to clarify my view on what a tri-state checkbox is about. The 3rd state is "not declared" which is different to a state of disabled.
Originally Posted by Condor
There seems to be a bug in this extension. The check event is getting blocked. So if I add a listener for the check event, it never gets called. Has someone else experienced this?
I abandoned this project when Ext 2.2 came out. Which version of Ext JS are you using?