如何换行的提示文本 [英] how to wordwrap text in tooltip
本文介绍了如何换行的提示文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何换行需要被显示在工具提示文本
How to wordwrap text that need to be appear in ToolTip
推荐答案
这看起来是不直接支持:
It looks like it isn't supported directly:
如何自动换行显示的工具提示?
下面是使用反射来
实现这一目标的方法。
Here is a method using Reflection to achieve this.
[ DllImport( "user32.dll" ) ]
private extern static int SendMessage( IntPtr hwnd, uint msg,
int wParam, int lParam);
object o = typeof( ToolTip ).InvokeMember( "Handle",
BindingFlags.NonPublic | BindingFlags.Instance |
BindingFlags.GetProperty,
null, myToolTip, null );
IntPtr hwnd = (IntPtr) o;
SendMessage( hwnd, 0x0418, 0, 300 );
瑞德宫
Rhett Gong
这篇关于如何换行的提示文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文