简体   繁体   English

Winform Tooltip控件在某些计算机上不应用样式

[英]Winform Tooltip Control doesn't apply style on some computers

I'm currently working on ac#/winform project, the winform contains a Tooltip that should have some custom style: 我目前正在从事ac#/ winform项目,该winform包含一个应具有自定义样式的工具提示:

this.toolTip1.BackColor = System.Drawing.Color.Black;
this.toolTip1.ForeColor = System.Drawing.Color.Chartreuse;

But on my computer, the Tooltip doesn't have any of these properties, my groupmate does have this properties displayed properly. 但是在我的计算机上,工具提示没有任何这些属性,我的队友确实正确显示了这些属性。

I'm on Windows 8 , he's on windows 7 we both use Visual studio 2013. 我在Windows 8上,他在Windows 7上,我们都使用Visual Studio 2013。

If you guys have any idea... 如果你们有什么主意...

Thanks. 谢谢。

EDIT: my mate tried to use W7 Aero Theme, tooltip's style doesen't applied anymore. 编辑:我的伴侣尝试使用W7 Aero主题,工具提示的样式不再适用。 EDIT2: Just in case, i tried other colors, it doesn't work anyway, moreover, the colors i want to use work elsewhere in our project. EDIT2:以防万一,我尝试了其他颜色,但无论如何它还是不起作用,此外,我想使用的颜色在我们项目的其他地方也可以使用。

Ok i finally found the problem, i add it in case someone's got the same problem. 好的,我终于找到了问题,我添加了以防万一有人遇到同样的问题。

As read the Doc once again, i understood that tooltips are drawn y the system if you dont set OwnerDraw to true. 再次阅读文档时,我了解到,如果不将OwnerDraw设置为true,则会在系统上绘制工具提示。

BUT if IsBallon is set to true also, it will "override" the owned draw and use system to draw the tooltip so it will ake it's default style value. 但是,如果IsBallon也设置为true,它将“覆盖”拥有的绘制并使用系统来绘制工具提示,从而使它成为默认样式值。

I just removed IsBalloon and edited the Draw event. 我刚刚删除了IsBalloon并编辑了Draw事件。

Worked 工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM