如何显示一个.NET气球工具提示? [英] How to show a .NET Balloon ToolTip?
本文介绍了如何显示一个.NET气球工具提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要如何表现出 IsBalloon
工具提示中的WinForms?
How do i show an IsBalloon
ToolTip in WinForms?
现在,我尝试:
ToolTip hint = new ToolTip();
hint.IsBalloon = true;
hint.ToolTipCaption = "Hello, world!"
hint.ToolTipIcon = ToolTipIcon.Error;
hint.Show("Please create a world.", myTextBox, 0, 0);
不幸的是,气球没有指向的到 (0,0)
(相对于对照),但显示了的 (0,0)
(相对于对照):
Unfortunately the balloon doesn't point to (0, 0)
(relative to the control), but shows up at (0,0)
(relative to the control):
什么是的正确的方式来显示一个.NET气球工具提示?
What is the correct way to show a .NET Balloon ToolTip?
推荐答案
已知的bug。呼叫两次,第一个空的:
Known bug. Call it twice, first empty:
toolTip.Show(string.Empty, myTextBox, 0);
toolTip.Show("Please create a world.", myTextBox);
这篇关于如何显示一个.NET气球工具提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文