Change colors (shape) of tooltip

Topics: Windows Forms
May 23, 2012 at 1:41 PM

Hi there,

Is there an easy way to do this?

Thanks in advance.

Coordinator
May 23, 2012 at 1:48 PM

wpf/forms?

May 23, 2012 at 1:49 PM

Sorry, "Forms". (I thought it would be the same way)

Coordinator
May 23, 2012 at 2:09 PM

marker.ToolTip.Stroke/Fill

May 23, 2012 at 3:04 PM

Ah, thanks. Had some issues, 'cause it seems that the markers has to be added to the map before you can change the behavior of the tooltip. Any way to use FromArgb(...)?

Coordinator
May 23, 2012 at 3:26 PM

marker.ToolTip.Stroke.Color = Color.FromArgb(140, Color.MidnightBlue); // http://msdn.microsoft.com/en-us/library/system.drawing.pen.aspx

May 23, 2012 at 3:29 PM
Edited May 23, 2012 at 3:31 PM

Ola radioman. Already tried that (Color.FromArgb(255, 64, 64, 64)), but I get the error that  Value of type 'System.Drawing.Color' cannot be converted to 'System.Drawing.Brush'. Same goes for the "Pens" btw.

- How do I change the text color btw. can't find any property.

Coordinator
May 23, 2012 at 3:32 PM

marker.ToolTip.Foreground

May 23, 2012 at 3:40 PM

Thanks for the foreground, but the color.fromargb doesn't seem to work.

May 23, 2012 at 4:08 PM

After some search in the MSDN I got an idea and I fixed it ;) Was a simple code-issue.