How could I go about displaying a menu with submenus? I want it to go under a textfield. I could use a combobox but the problem is, I do not think you can use submenus with them.
You do not have to use the contextual menu as-is. Or put another way, you can co-opt the contextual menu handlers, or bypass them altogether.
MenuItem has a PopUp method that you can call to display the menu wherever you want. So construct a menu (you can create a subclass of EditField and call ConstructContextualMenu from Mousedown, for example) and pop it up in MouseDown.
(This also answers your other question about how to have a menu display in response to a left click.)
[quote=54259:@Tim Hare]You do not have to use the contextual menu as-is. Or put another way, you can co-opt the contextual menu handlers, or bypass them altogether.
MenuItem has a PopUp method that you can call to display the menu wherever you want. So construct a menu (you can create a subclass of EditField and call ConstructContextualMenu from Mousedown, for example) and pop it up in MouseDown.
(This also answers your other question about how to have a menu display in response to a left click.)[/quote]
Thanks!!