
The SelectTree control provides the perfect combination of tree-based data selection with drop-down combo-box space consumption. This component was created to fit a large tree into a very small space.
Usage: The tree acts like any other form control when you tab to it you can use the spacebar to open the control and then use the arrow keys to navigate the tree, select an item and then tab again to close the control and move on. You can also use the mouse to open and select an item which will automatically close the control.

Tag Usage:
<view:SelectTree id="selectTree"
dataProvider="{subjects}"
change="treeChange(event)"
labelField="sSubject"
tabEnabled="true"
tabIndex="2"
textFunction="getSelectTreeItemText" />
Installation: Installation requires only placing the SelectTree.mxml file in your project and either including the main.css file in your mxml file or moving the class in their to your CSS file. The zip file also includes a sample use of the SelectTree. In the sample file, look for the sections marked Customize to configure it for your use. The SelectTree was designed for use with the CFC object hierarchy that I posted previously.
Known Issues: (please feel free to help me fix them)
Final Disclaimer: I am in no way a master Flex Component developer and I can only hope that someone who is will contact me with a much better way to code this component. Until then, it works for me so I hope it will work for you.
Enjoy!
March 7, 2007 at 10:45 am |
Nice work. I found I had to shrink the width of the TextInput in the component, else the dropdown was unavailable.
Jamie.
March 19, 2007 at 11:33 am |
Kurt, one of my co-workers in the USA has created a sample that uses a tree control as the dropDownFactory of the Combobox.
We’ve looked into it as a customer has requested this functionality and it seems to work just fine.
Let me know what you think and if it does the job for you:
http://kmossman.blogspot.com/2007/03/blog-post.html
Patrick
August 23, 2007 at 6:24 am |
Hi,
Its nice work,
i just want to know, can we show checkbox array on dropdown?
Thanks,
Prashant.
August 26, 2007 at 8:27 pm |
Not with mine, but there is one out there… http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1046966
February 26, 2008 at 3:17 pm |
I have not learned CF yet and cant load one more thing on my laptop (until my company gets me a new one). Would it be possible to get a flex only example. I have loaded it into the flex 3 beta (I also have flex 2 — which my company just purchased for me), but I am getting, as you would expect, the 1180 error “Call to possibly undefined method SubjectGateway”.
August 28, 2008 at 3:34 pm |
Steve, the current download code has a commented out section where you can specify the index of the selected item. Any progress on implementing that?
August 28, 2008 at 8:44 pm |
unfortunately, no, my flex dev time these days is very limited. Good Luck!