• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

关于Delphi的Hint

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

今天讲课的时候讲到了Application的OnHint事件,发现还是很多关于HINT的东西许多人不了解,随便GOOGLE了一下,摘录了一些:

1.一篇很好的关于HINT的文章。

Delphi的Hint入门指导

http://blog.csdn.net/cyai/archive/2008/02/22/2113744.aspx

这个文章对HINT进行了详细的描述,但是没有讲到GetShortHint和GetLongHint,下面的文章是对这个方面的补充。

 

2.这个是关于HINT的一个简短描述,写的很好。

Description

TApplication's Hint property is assigned the Hint value of the control or menu item that the mouse is currently moving over. It can also be assigned a string value that informs the user of some action, error, or other type of information. Therefore, use Hint either to:

Transfer hints from controls to another area of display, such as a status bar, using the OnHint event handler. This reads the Hint property.
Indicate the status of the application while it is processing some action. This sets the Hint property.

Help Hints appear when the OnHint event occurs. Therefore, if TApplication抯 Hint property is assigned to the status bar抯 caption, for example, the caption of the status bar control displays the current string value of the Hint property during an OnHint event.

There are two parts to the Hint string: short and long. Short hints are used by pop-up tool tips. Long hints are used by the status bar, separated by the | character. Use the global functions GetShortHint and GetLongHint, from the Controls unit to extract the long and short hints from a hint string.

Note: When setting Hint to a message informing the user of an event occurring in the application, remember that, by default, the Hint string is reset to a control抯 Hint when the mouse cursor moves over a control.

3.在DELPHI2009之后,增加了一个 TBalloonHint的控件,就不需要像1这样去自己写了,并且这个BOOLHINT长的还是挺漂亮的。

下面的文章就是对TBalloonHint的介绍,来之万一老师的BLOG

Delphi 2009 之 TBalloonHint

http://www.cnblogs.com/del/archive/2008/08/14/1267834.html

这个控件的原理还是基与前面HINT的介绍。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
哪些知识点是学习matlab应该熟练掌握的?发布时间:2022-07-18
下一篇:
matlab函数绘图及其功能显示发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap