动态工具提示文字 [英] dynamic tooltip text

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

问题描述

我需要在几个按钮上添加动态工具提示文本(即,文本会根据当前活动项的内容而变化).我知道我可以使用表单的设计器类添加静态文本,但是设计器类不允许我使用表单类中保存的活动项的名称来更新文本.

i need to add dynamic tooltip text to a few buttons (i.e. the text changes according to what the currently active item). i know i can add static text using the designer class of the form, but the designer class won't allow me to update the text with the name of the active item that is held in the form's class. is there something i can use for this?

推荐答案

您需要使用SetToolTip方法.

You'll need to use the SetToolTip method.

 

toolTip.SetToolTip( myControl,myNewText);

toolTip.SetToolTip(myControl, myNewText);


 Regards


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

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