GMapMarker.Tooltip Text Alignment

Topics: Windows Forms
Dec 9, 2011 at 12:42 AM

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 9, 2011 at 12:45 AM

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;