Hi,
I want a combo box which would behave like the combox box present on FileOpenDialog. This combo box display its contains in tree view manner in its drop down list. If there is any special control in infragistic, please let me know. If not, how should i proceed?
Thanks in adavance,
Ujwal Salunkhe
Hi Ujwal,
There's no control with a dropdown tree built-in. But you can make your own and it's pretty easy. Place an UltraTextEditor control on a form and use the ButtonsRight collection to add a DropDownEditorButton. Set this button's Control property to an UltraWinTree control.
You now have a dropdown control with a tree on it. And the best part is that this control is an editor. So you could use it as the EditorControl of a grid cell, for example.
Hi Mike,
Thanks for the help. I will try it and let you know.
Thanks,
Ujwal
That was a wonderful solution. however i have a caveat. After selecting a node (in my case it is always leaf node) the treeview is not hiding itself as a dropdown would do. Any workarounds?
Regards,
Viswanth V.G
When you roll your own dropdown control in this manner, the dropdown has to be explicitly told when to close itself. The simplest way to solve this problem is to handle the UltraTree's 'AfterSelect' event, and call the DropDownEditorButton's 'CloseUp' method from there.
In case anyone looks this up in the future, the key seems to be to use something like:
Do a search for the posting
"Doubleclick on scrollbar in UltraTree" for more details.
Brian,
I ran into one snag using MouseUp and KeyDown... Using the scrollbar results in a MouseUp and my treecontrol closing. I need some way to distinguish between click on tree items, and simply using the scrollbar. I have the following code (abbreviated for clarity):
}
Can you suggest a work around or different approach?
Andrew
UltraWinTree hides the selection by default when it does not have focus. The Inbox tree control does the same thing.
Try setting HideSelection on the tree to false and see if that helps.
I tried it, but in vain. Below is the code snippet that i wrote inside BeforeEditorButtonDropDown event..,
{
Anything wrong here? The cursor was in the UltraFieldTextEditor., may be is that a reason?
Thanks,.
Thanks. That's the way I started to implement it. Nice to know I'm on the right path.
-Andrew