本文介绍了文本框字符串作为悬停工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在构建一个应用程序,并且我有一个 TextBox
控件,该控件中填充了一个值.在某些情况下,控件太小,我没有足够的空间来扩展它.
I'm building an application and I have a TextBox
control that is filled with a value. On some occasions the control is too small and I don't have the space to expand it.
当控件过小时,如何在鼠标悬停时显示 TextBox
内容?
How do you show the TextBox
content on hover when the control is too small?
推荐答案
在表单和以下代码中添加工具提示
Add a tooltip to the form and the following code
Private Sub TextBox1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.MouseHover
ToolTip1.SetToolTip(TextBox1, TextBox1.Text)
End Sub
这篇关于文本框字符串作为悬停工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!