I'm doing the GUI for a paint-like program, where the user will be able to select a drawing tool from a ToolStrip. Some of these tools have variations, and I'd like the user to be able to select one via a popup menu.
Anyone familiar with the Photoshop toolbar interface will know what I'm after: the user can either click the button and start working with the selected tool, or pick one of the tools from the popup menu that appears upon click, and from that point on the button will represent that tool. Also, the button will have the Checked property set to True when that tool-family is selected.
I thought this could be accomplished with a SplitButton or DropDownButton, but these don't have a Checked property for the user to see what tool is currently selected. So I went with a ToolStripButton and a ContextMenuStrip that is shown upon click.
The problem is that since I'm taking the cursor position to show the ContextMenuStrip, depending on what part of the ToolStripButton is clicked, the popup menu might cover it partially, and it is a very unpolished look. How can I get the ToolStripButton's screen coordinates? Or is there a better (and still relatively simple) way to do this?