I have 2 UltraPictureBox. ultraPictureBox1 and ultraPictureBox2. I added to the property ContextMenuUltra a PopupMenuTool from the UltraToolBarManager.At both PictureBoxes it’s the same PopupMenuTool. (I have only 1 PopupMenuTool)In the ToolClick event, how can I get out on wich PictureBox the PopupMenu was clicked?private void ultraToolbarsManager1_ToolClick(object sender, ToolClickEventArgs e){}
You can handle the BeforeToolDropdown event of the UltraToolbarsManager. The event arguments for this event contain a SourceControl property which indicates the control for which the context menu was shown. You can cache a reference to the control in this event and then clear it in the AfterToolCloseup event handler.
I'm attempting to do this but there appears to be a bug in this.
If I do this for a control (TextEditor for example) that is not the active control on the form it works fine. When the control has focus however, e.SourceControl is empty, no name, no control. Thoughts?