How to determine which control caused activation of a context menu?
My Application dynamically creates UltraTree controls on TilePanels. Each UltraTree, once created, is added to the ultraToolbarsManager1 with the SetContextMenuUltra(newUltraTreeControl,"Popup Context Menu Name")
The proper context menu items are made visible or not before the contrext menu is shown based on which control activiated the context menu.
I have dealt with this problem before. Basically the workaround I followed was to create a variable to hold the control that was right clicked. In the BeforeMenuDropdown (or so.. i think..) event for the toolbar manager, save the sender argument to the variable mentioned. Upon handling the toolclick event, check this variable to see which control was actually right clicked on.