首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

怎么在PB9中实现在静态文字控件下显示提示

2013-01-09 
如何在PB9中实现在静态文字控件上显示提示?我有一窗口界面,上面有很多静态文本控件,需要在鼠标移动到每个

如何在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

$PBExportHeader$uo_statictext.sru
forward
global type uo_statictext from statictext
end type
end forward

global type uo_statictext from statictext
integer width = 457
integer height = 72
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "none"
boolean focusrectangle = false
event ue_mousemove pbm_mousemove
end type
global uo_statictext uo_statictext

type variables
public:
integer tipicon = 0 //提示框显示的图标:TTI_NONE=0,TTI_INFO=1,TTI_WARNING=2,TTI_ERROR=3
string tiptitle = '' //提示框显示的标题
rowfocusind Tooltiptype = hand! //提示框显示类型:hand! 为气泡型提示框, focusrect! 为方框型提示框, off!为不显示

private:
nvo_tooltips invo_tooltip
int i_uid
end variables
event ue_mousemove;invo_tooltip.of_relaymsg( this, 512) //512代表鼠标移动是显示tooltip
end event

on uo_statictext.create
end on

on uo_statictext.destroy
end on

event 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
[解决办法]
楼主,你的问题解决了吗?解决后,请分享一下

热点排行