c# - Show ContextMenuStrip at location of StatusBar item -
I want to show a context menu strip instead of ToolStripStatusLabel in a statistrip. Normal controls have pointoscrins / point clients / etc, but as the toolstrapstatus label is derived from the component.
Any help would be appreciated.
There is a very, very late answer, just because I struggled with the same issue and This question has been lifted up. The best solution I have found so far has been a good turn in the answer. Here it is:
Zero toolstriptitlemeasubject (Object sender, mouse EventArgues E) {if (e.button == mousebutton.write) {var label = (toolstripteam) sender; this.contextMenuStrip1.Show (this.mainStatus Strip, label.Bounds.X + eX, label.Bounds.Y + eY);}}
Mouse against control for coordinates (E.X., E.I.) Adding coordinates appears exactly on the right position, it is removed from the menu and shown in the upper left corner of the ToolStripteam for record.
Comments
Post a Comment