Tree Widgets and COntext Menus [message #53002] |
Wed, 14 March 2007 06:33 |
aric911
Messages: 1 Registered: March 2007
|
Junior Member |
|
|
I am trying to create a tree widget with context menus. I keep running
into problems with the menu's base. To give you an idea of what i am
doing I have a structure similar to the following:
base1 = WIDGET_BASE()
tree = WIDGET_TREE(base1)
menu = WIDGET_BASE(tree, /CONTEXT_MENU)
menuOpt = WIDGET_BUTTON(menu, VALUE='HELLO WORLD')
menuOpt1 = WIDGET_BUTTON(menu, VALUE='HELLO WORLD1')
If i do it that way then I get extra nodes in my tree....which are
essentially the context menu widgets. If I make the parent of the menu
base1 then the widget layout gets messed up. Does anybody have any
ideas why I can't create a menu off tree or first base widget?
I have seen examples of where you have to do the following....
base1 = WIDGET_BASE()
base2 = WIDGET_BASE(base1)
tree = WIDGET_TREE(base1)
menu = WIDGET_BASE(base2, /CONTEXT_MENU)
menuOpt = WIDGET_BUTTON(menu, VALUE='HELLO WORLD')
menuOpt1 = WIDGET_BUTTON(menu, VALUE='HELLO WORLD1')
With this solution though you have to introduce an unnecessary base
widget and I would like to avoid that.
Thanks,
Aric
|
|
|