[英]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? 所以我有一个工具提示附加到Windows窗体中的图片框,显示的文字很好,没有任何错误,但是当我改变背景没有任何反应时,我想要一种黄色的背景颜色,但它根本不会改变, 谁能帮帮我吗?
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(); 我已经在属性窗口中的tooltip1文本上设置了工具提示,它完美地显示了文本,但是当我设置背景颜色时,没有任何反应或者我得到颜色但是当我说e.DrawBackground()时没有显示文本。
Did you saw this question C# How can I change the BackColor of a ToolTip with isBalloon = true? 您是否看到过这个问题C#如何使用isBalloon = true更改工具提示的BackColor? . 。
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 . 您指向此链接https://social.msdn.microsoft.com/Forums/vstudio/en-US/77cf51ac-1c52-4f2e-8ab8-42c4ba864b7d/can-i-change-the-colour-of-the- tooltip-item-from-my-program?forum = csharpgeneral 。
The suggestion is basically to set DrawToolTopEventArgs in the OnDraw method. 建议基本上是在OnDraw方法中设置DrawToolTopEventArgs。
HTH HTH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.