MapWindow Developer Team : MapWindow Discussion Forum
Hello, 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").Enabl
MapWindow.Interfaces.Toolbar.DropDownButtonItem(?)
Posted by: arjereza ()
Date: September 24, 2010 12:28AM

Hello,

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.

Re: MapWindow.Interfaces.Toolbar.DropDownButtonItem(?)
Posted by: arjereza ()
Date: September 27, 2010 06:45PM

Hello,

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.

Sorry, only registered users may post in this forum.





Banner Exchange




GISCP.com




Send us your banner logo (160x120) for the space above, and add this MapWindow banner ad to your site:

Just paste this text in your page: