工具提示 [英] Tool tips

查看:49
本文介绍了工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在表单上显示一些数据作为工具提示文本,

以避免使表单混乱。我正在使用SetToolTip

作为文本框。


tipNotesMoved.SetToolTip(ShowPatient.txtNotesTrack ing,

strNotesMoved)


我希望数据从患者变为患者,并且根据MSDN确定
,SetToolTip将允许这样做。引用

MSDN:

不止一次调用SetToolTip方法给定控件的
没有指定多个工具提示文本

显示控件但改为当前

工具提示文本为控件。


但实际发生的是它正确显示

第一位患者,但随后为

秒添加了另一个工具提示。第一个病人的数据随着第二个病人的数据弹出,然后是



有谁知道如何清除工具提示?我使用了

RemoveAll方法,但它什么也没做。你仍然可以获得多个小贴士。


谢谢,

海伦

I want to show a bit of data on a form as a tool tip text,
to avoid cluttering up the form. I am using SetToolTip
for a text box.

tipNotesMoved.SetToolTip(ShowPatient.txtNotesTrack ing,
strNotesMoved)

I want the data to change from patient to patient, and
according to MSDN, SetToolTip will allow this. To quote
MSDN:
Calling the SetToolTip method more than once
for a given control does not specify multiple ToolTip text
to display for a control but instead changes the current
ToolTip text for the control.

But what actually happens is that it shows correctly for
the first patient but then adds another tooltip for the
second. The data for the first patient pops up followed
by the data for the second patient.

Does anyone know how to clear a tool tip? I have used the
RemoveAll method but it does nothing. You still get
multiple tips appearing.

Thanks,
Helen

推荐答案

Helen,


" Helen Trim" <他************** @ porthosp.nhs.uk> schrieb:
Helen,

"Helen Trim" <he**************@porthosp.nhs.uk> schrieb:
我想在表单上显示一些数据作为工具提示文本,
以避免使表单混乱。我正在使用SetToolTip
作为文本框。

tipNotesMoved.SetToolTip(ShowPatient.txtNotesTrack ing,
strNotesMoved)

我希望数据发生变化从患者到患者,并且根据MSDN,SetToolTip将允许这样做。引用
MSDN:
多次调用SetToolTip方法
对于给定的控件没有指定多个ToolTip文本
显示为一个控件而是改变当前的
控件的工具提示文本。

但实际发生的是,它显示正确的第一位患者,但随后为第二位患者添加了另一个工具提示。第一位患者的数据随后由第二位患者的数据弹出。


我无法重现这种行为(.NET 1.1 SP1,Windows XP

Professional SP2)。

有没有人知道如何清除工具提示?我使用了
RemoveAll方法,但它什么也没做。您仍然会看到多个提示。
I want to show a bit of data on a form as a tool tip text,
to avoid cluttering up the form. I am using SetToolTip
for a text box.

tipNotesMoved.SetToolTip(ShowPatient.txtNotesTrack ing,
strNotesMoved)

I want the data to change from patient to patient, and
according to MSDN, SetToolTip will allow this. To quote
MSDN:
Calling the SetToolTip method more than once
for a given control does not specify multiple ToolTip text
to display for a control but instead changes the current
ToolTip text for the control.

But what actually happens is that it shows correctly for
the first patient but then adds another tooltip for the
second. The data for the first patient pops up followed
by the data for the second patient.
I am not able to reproduce this behavior (.NET 1.1 SP1, Windows XP
Professional SP2).
Does anyone know how to clear a tool tip? I have used the
RemoveAll method but it does nothing. You still get
multiple tips appearing.




您可以通过将控件的工具提示设置为空字符串来删除它:


\\\

Me.ToolTip1.SetToolTip(Me.TextBox1,"")

///


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://dotnet.mvps.org/dotnet/faqs/>



You can remove a control''s tooltip by setting it to an empty string:

\\\
Me.ToolTip1.SetToolTip(Me.TextBox1, "")
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>




谢谢,但我已经尝试过了。无论我做什么,它都会增加工具提示并且不会清除它们。


哦,回到绘图板。


谢谢,

海伦


Thanks, but I had already tried that. Whatever I do, it
still adds more tooltips and won''t clear them.

Oh well, back to the drawing board.

Thanks,
Helen


Helen,


Helen Trim <一个******* @ discussions.microsoft.com> schrieb:
Helen,

"Helen Trim" <an*******@discussions.microsoft.com> schrieb:
谢谢,但我已经尝试过了。无论我做什么,它仍然会添加更多的工具提示,并且不会清除它们。
Thanks, but I had already tried that. Whatever I do, it
still adds more tooltips and won''t clear them.




您使用的是什么Windows / .NET版本?


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://dotnet.mvps.org/dotnet/faqs/>



What Windows/.NET version are you using?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


这篇关于工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆