Good day to all.
I have been playing around in creating a simple plugin for mapwindow and noticed something, when I create a drop down button I get an error whenever I try to set its enabled when called like so MapWin.Toolbar.ButtonItem("NewBtn").Enabled = false.
Now I did a bit of looking around the mapwindow code and figured that the problem might has something to do with the ButtonItem function found in clsToolbar which only returns a ToolStripButton rather than returning either a ToolStripButton or a ToolStripDropDownButton. That's also when I saw the DropDownButtonItem function. My question is, is there a reason why this function wasn't implemented? I would like to give it a try and implement it but I'm hesitant as there might be a reason why it wasn't used. Or am I just totally off and it isn't really needed.
Much appreciation for any response.
So, I tried adding the DropDownButtonItem interface, which to my surprise, was really quite simple. Then tried implementing it and so far it works.
If anyone is interested just add:
ToolbarButton DropDownButtonItem(string Name);
in interfaces.cs under public interface toolbar. Build and rereference then go to DropDownButtonItem function in clsToolbar.vb at mapwindow and then just add implements Interfaces.Toolbar.DropDownButtonItem at the header.
Hope this helps anyone.