求源码(PB 9)PB状态栏多栏

hjj841020 2007-08-09 10:43:13
急!!!!谢谢那位高手能够无私奉献~``要求就是能把状态栏分成多栏,栏和栏之间有分割线,主窗口中间是下凹的(象MDIHELP这种)
我的邮箱是wshongjinjiang@sina.com
...全文
500 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
hjj841020 2007-08-10
  • 打赏
  • 举报
回复
谢谢!!我用已经解决了.
hjj841020 2007-08-09
  • 打赏
  • 举报
回复
能提供一下吗?谢谢啊~~
jlwei888 2007-08-09
  • 打赏
  • 举报
回复
PB本身带的PFC例子中就有!
hjj841020 2007-08-09
  • 打赏
  • 举报
回复
自已顶一下!!
PowerSoft-001 2007-08-09
  • 打赏
  • 举报
回复
把以下代码示例放到文本文件再改后缀名为:.srw再导入pb9中就行。

forward
global type w_main from window
end type
type mdi_1 from mdiclient within w_main
end type
type dw_status_bar from datawindow within w_main
end type
end forward

global type w_main from window
integer width = 3328
integer height = 2048
boolean titlebar = true
string title = "油品管理信息系统--防伪税控接口软件"
string menuname = "main_menu"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
windowtype windowtype = mdi!
windowstate windowstate = maximized!
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
mdi_1 mdi_1
dw_status_bar dw_status_bar
end type
global w_main w_main

on w_main.create
if this.MenuName = "main_menu" then this.MenuID = create main_menu
this.mdi_1=create mdi_1
this.dw_status_bar=create dw_status_bar
this.Control[]={this.mdi_1,&
this.dw_status_bar}
end on

on w_main.destroy
if IsValid(MenuID) then destroy(MenuID)
destroy(this.mdi_1)
destroy(this.dw_status_bar)
end on

event open;//将状态条中的 st_process设为不可见,保存它的宽度到st_width中。
dw_status_bar.modify('st_process.background.mode="1" st_process.background.color="536870912"')
dw_status_bar.modify('st_width.text="'+dw_status_bar.describe('st_process.width')+'"')


dw_status_bar.modify('st_unitname.text="'+'软件版本:1.0 制作:信息部'+'"')
//dw_status_bar.setitem(1,'user','北极星工作室')

end event

event resize;integer li_height,li_width
li_height = this.workspaceHeight()
li_width = this.workspaceWidth()

mdi_1.x = this.workspacex()
mdi_1.y = this.workspacey() - 4
mdi_1.height = li_height - dw_status_bar.height + 8
mdi_1.width = li_width

dw_status_bar.x = this.workspacex() - 4
dw_status_bar.y = mdi_1.y + mdi_1.height
dw_status_bar.width = li_width + 4


//修改线长
string ls_y,ls_mstring
int ls_x,ls_w,li_bmp_x
ls_y = string(li_width )
ls_mstring += 'line_1.x2="'+ls_y+'" '

ls_mstring += 'line_3.x1="'+ls_y+'" '
ls_mstring += 'line_3.x2="'+ls_y+'" '

ls_mstring += 'line_2.x2="'+ls_y+'" '
li_bmp_x = li_width - 54
ls_mstring += 'line_2.x2="'+string(li_bmp_x)+'" '

if li_width - 10 <=0 then return

ls_x = integer(dw_status_bar.describe('line_1.x1') ) +14 + 100 - 70
ls_w = integer( ls_y) - ls_x - 14 - 100 - 70
ls_mstring += 'st_mess.width="'+string(ls_w)+'" '

ls_mstring += 'p_resize.x="'+string(li_bmp_x)+'"'

dw_status_bar.modify(ls_mstring)



end event

type mdi_1 from mdiclient within w_main
long BackColor=268435456
end type

type dw_status_bar from datawindow within w_main
integer x = 448
integer y = 1252
integer width = 1879
integer height = 80
integer taborder = 10
string dataobject = "d_cm_status_bar"
boolean border = false
boolean livescroll = true
end type

ribut9225 2007-08-09
  • 打赏
  • 举报
回复
偶是自己做的
以前试过两个方案
一、用一个dw
二、用N个SLE控件放在MDI窗口中

1,108

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧