CheckBoxTree Component (Adobe Flex 3)
Tuesday, December 30th, 2008 - 11:21 - Code
Building on already available CheckTree renderers, here is the first release (0.1) of the CheckBoxTree component. Supports three state items i.e. “checked”, “unchecked”, “schrodinger” and it has a basic search function implemented.
Sample code:
<inputs:CheckBoxTree width="480" height="320" title="Indian Subcontinent"> <inputs:dataProvider> <mx:XMLListCollection> <mx:source> <mx:XMLList xmlns=""> <node state='checked' label='All' value='1'/> <node state='unchecked' label='Afghanistan' value='2'/> <node state='unchecked' label='Bangladesh' value='3'/> <node state='unchecked' label='Bhutan' value='4'/> <node state='unchecked' label='India' value='91'> <node state='unchecked' label='Jammu and Kashmir' value='10'/> <node state='unchecked' label='Himachal Pradesh' value='11'/> <node state='unchecked' label='Punjab' value='12'/> <node state='unchecked' label='Haryana' value='13'/> <node state='unchecked' label='Uttaranchal' value='14'/> </node> <node state='unchecked' label='Nepal' value='5'/> <node state='unchecked' label='Pakistan' value='6'/> <node state='unchecked' label='Sri Lanka' value='7'/> </mx:XMLList> </mx:source> </mx:XMLListCollection> </inputs:dataProvider> </inputs:CheckBoxTree>
A quick screen shot..
Again, all code self explanatory. Proper documentation will follow when advanced features will be introduced into the component.
What’s next?
– Select all, Clear all features
– Support for multiple dataProviders
– getCheckedItems(), setCheckedItems() methods etc.

I am a newbi to flex.
Can we show checkboxes only in the lower level? or can we restrict clicking upper level check boxes?
Just modify the dataProvider to achieve single level.
could anyone tell me how to create checkbox tree for C: in windows
using adobe flex
Hi,
please how can I get select items in the tree ? Any ideas please
hai ,
I came to see your component from one of my friends application. He had used it. So i also just jumped in and used one for my application . Everything went well , till the need arose for me to show the component in view mode.
What i have ? :
I have a panel in which your component is included. The required renderer file and the component file are placed in the package.
Now in view mode , i want to show the user the tree , but restrict his ability to click the check box . I am at a loss here .
I need this to happen only in the view mode .
Could you help me out .
Also have you updated this component ?
Thanks srirangan.
Martin
Hai Srirangan,
How do i disable the check box enabled state in your componenent ?
Regards
Martin
[…] CheckBoxTree Component (Adobe Flex 3): http://srirangan.net/?p=56 […]
[…] This post was mentioned on Twitter by Dennis Plucinik. Dennis Plucinik said: Reading: Srirangan » Blog Archive » CheckBoxTree Component (Adobe Flex 3): http://bit.ly/dddw3J […]