pb中实现状态栏(多栏)

新建用户对象uo_comctl_statusbar,然后把用户对象拖至mdi窗口内,name改为uo_statusbar

 

然后在窗口的open事件里写以下代码

 

long ll_Parts[3]
integer li_width
string ls_statusbar_txt

 

uo_statusbar.Resize(-1, -1)
li_width = UnitsToPixels(this.workspacewidth(), YUnitsToPixels!)
llparts[1] = round(li_width * 0.4, 0)
llParts[2] = round(li_width * 0.7, 0)
llparts[3] = round(li_width * 1.0, 0)
uo_statusbar.of_SetParts(llParts )
BringWindowToTop( handle(uo_statusbar) )

 

//第一栏为系统的微帮助

uo_statusbar.of_SetText(0, 0, GetApplication().MicroHelpDefault)

 

//第二栏为操作员
uo_statusbar.of_SetText(1, 0, '操作员:系统管理员')

 

//第三栏为时间
uo_statusbar.of_SetText(2, 0, string(today(), 'YYYY-MM-DD') + ' ' + String( now(), "hh:mm:ss" ) )

 

 

 

uo_comctl_statusbar 源文件如下

 

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值