更改winform工具提示背景色 [英] Change winform ToolTip backcolor
本文介绍了更改winform工具提示背景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在项目中使用ToolTip控件.我想将其背景色设置为红色.我将ownerdraw属性更改为true,并将backcolor更改为红色.但是没有结果.有什么建议吗?
I am using a ToolTip control in my project. I want to set its backcolor red. I have changed ownerdraw property to true and backcolor to red. But no result. Any suggestion?
关于,skpaul.
推荐答案
设置以下属性:
yourTooltip.OwnerDraw = true;
yourTooltip.BackColor = System.Drawing.Color.Red;
然后在Draw事件上使用此:
then on the Draw event use this :
private void yourTooltip_Draw(object sender, DrawToolTipEventArgs e)
{
e.DrawBackground();
e.DrawBorder();
e.DrawText();
}
这篇关于更改winform工具提示背景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文