Search code examples
c#tooltippictureboxwindows-forms-designer

ToolTip Background Windows Form


So I have a tool tip attached to a picturebox in a windows form and the text displayed is fine with no errors nothing, but when I change the background nothing happens, I want a yellow type of background colour but it doesn't change at all, can anyone please help me?

I have set the tooltip on tooltip1 text in the properties window which displays the text perfectly, but when I set the background colour either nothing happens or I get the colour but no text to show when I say e.DrawBackground();

enter image description here


Solution

  • Did you saw this question C# How can I change the BackColor of a ToolTip with isBalloon = true?.

    Which points you to this link https://social.msdn.microsoft.com/Forums/vstudio/en-US/77cf51ac-1c52-4f2e-8ab8-42c4ba864b7d/can-i-change-the-colour-of-the-tooltip-item-from-within-my-program?forum=csharpgeneral.

    The suggestion is basically to set DrawToolTopEventArgs in the OnDraw method.

    HTH