Talk:MapWindowDevelper:Toolbar
From MapWindow GIS
Using the first syntax for AddButton (name only) will result in toolbar buttons that are twice as high and potentially much wider than the existing toolbar buttons. The solution is to use the second syntax (name and picture) to add an icon to the button, and use a ToolTip to hold any textual description. In the Initialize procedure of the plug-in, add some code like this:
...
g_MapWin = MapWin
g_MapWin.Toolbar.AddButton("AJMRuler", New System.Drawing.Icon(Me.GetType, "Ruler.ico"))
g_MapWin.Toolbar.ButtonItem("AJMRuler").Tooltip = _
"Measure distance between two points."
...
In the definitions of the icons in the VB.NET project, be sure to change their Build Action property from the default value ("content") to Embedded Resource.
















