[2.2] Tri-state tree/Tree with themed checkbox [NEW v1.2]
Ext 2.2 introduced a themed checkbox component, but unfortunately the new checkbox theme wasn't used for trees and fieldsets.
So I started out making a TreeNodeUI that would use checkbox images instead of checkbox inputs.
After I finished I couldn't resist making a TreeNodeUI descendant that would do what many of you have asked for: support checkboxes with a grayed/partial state and automatic cascading.
Include TreeCheckbox.css and TreeCheckbox.js to get themed checkboxes in your grid.
Include TriStateNodeUI.css and TriStateNodeUI.js and set the uiProvider to TriStateNodeUI to get automatic update of parent/child checked states.
If your tree is very large or if you are using asynchronous node loading (AsynchTreeNode) you should use AsynchTriStateNodeUI instead of TriStateNodeUI (because children that aren't loaded yet can't be checked/unchecked).
Check out example.html to see how to use the new components.
- Removed CSS margin.
- Added getChecked method to return correct checked state, even with AsynchTriStateNodeUI.
- Changed TriStateNodeUI to do a real check cascade and moved the original virtual cascading code to AsynchTriStateNodeUI, to be used when a real cascade is to slow (large tree) or impossible (asynchronous node loading).
New version 1.2:
- Fixed bug when in mixing nodes with and without checkboxes.
- Only fire checkchange if checked stated actually changed.