GMapMarker.Tooltip Text Alignment

Topics: Windows Forms
Dec 8, 2011 at 11:42 PM

Hey guys,

Any pointers on how to change the default alignment of the GMapMarker.Tooltip Text? I've tried to set Tooltip.Format with a StringFormat but it complains about it being a read only property.

Thanks :-)

Dec 8, 2011 at 11:45 PM

I'm a tool, for those who encounter the same problem, if you try and create another StringFormat object and then assign it to the marker as such:

                    marker.ToolTip = new GMapToolTip(marker);
                    StringFormat sf = new StringFormat();
                    sf.Alignment = StringAlignment.Near;
                    marker.ToolTip.Format= sf;

You get an error complaining about read only properties.

Use this instead;

                    marker.ToolTip = new GMapToolTip(marker);
                    marker.ToolTip.Format.Alignment = StringAlignment.Near;