如何在PB9中实现在静态文字控件上显示提示?
我有一窗口界面,上面有很多静态文本控件,需要在鼠标移动到每个文本控件上时在旁边显示提示信息,在PB9能实现吗?
在网上找了很久都没能解决,希望大家帮帮我,这个项目现在比较紧急。
如果大家有封装好的控件,发给我也行,非常感谢!
我的邮箱:39011937@qq.com
[解决办法]
下面有两个对象,你讲它们分别保存为uo_statictext.sru 和 nvo_tooltips.sru ,然后导入pbl文件
再对你的窗口中进行Edit Source,然后将Edit Source看到的内容中的from statictext 全部替换为from uo_statictext即可。其他控件也可以仿照uo_statictext控件的写法添加tip
(1)uo_statictext.sru
- C/C++ code
$PBExportHeader$uo_statictext.sruforwardglobal type uo_statictext from statictextend typeend forwardglobal type uo_statictext from statictextinteger width = 457integer height = 72integer textsize = -9integer weight = 400fontcharset fontcharset = gb2312charset!fontpitch fontpitch = variable!string facename = "宋体"long textcolor = 33554432long backcolor = 67108864string text = "none"boolean focusrectangle = falseevent ue_mousemove pbm_mousemoveend typeglobal uo_statictext uo_statictexttype variablespublic:integer tipicon = 0 //提示框显示的图标:TTI_NONE=0,TTI_INFO=1,TTI_WARNING=2,TTI_ERROR=3string tiptitle = '' //提示框显示的标题rowfocusind Tooltiptype = hand! //提示框显示类型:hand! 为气泡型提示框, focusrect! 为方框型提示框, off!为不显示private:nvo_tooltips invo_tooltipint i_uidend variablesevent ue_mousemove;invo_tooltip.of_relaymsg( this, 512) //512代表鼠标移动是显示tooltipend eventon uo_statictext.createend onon uo_statictext.destroyend onevent constructor;invo_tooltip.of_set_tippro( tipicon, tiptitle, TOOLTIPTYPE)i_uid = invo_tooltip.of_addtool( this, this.tag, 0) //以控件的tag属性为tip内容end event
[解决办法]
最近回复过得帖子,被CSDN给沉了,重新顶起
[解决办法]
pb11.0 之后的版本 都 自带此功能了。
[解决办法]
http://download.csdn.net/download/newease/1570693
http://p.blog.csdn.net/images/p_blog_csdn_net/newease/EntryImages/20090814/tooltips633858371622500000.jpg
[解决办法]
楼主,你的问题解决了吗?解决后,请分享一下