社区
PowerBuilder
帖子详情
pb中如何动态创建菜单?
jqka007
2003-08-19 02:17:47
在pb中,想通过查询数据库的相关记录动态创建菜单,应该如何实现,请高手指点
...全文
66
1
打赏
收藏
pb中如何动态创建菜单?
在pb中,想通过查询数据库的相关记录动态创建菜单,应该如何实现,请高手指点
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
chrisfy
2003-08-19
打赏
举报
回复
看看已有菜单的Edit source
动态创建
与读取
菜单
源码
PB
动态创建
菜单
........
PB
动态创建
菜单
........
pb
动态生成
菜单
.txt
在
PB
帮助的MENU OBJECT一节当
中
,关于其PROPERTIES描述当
中
有一项: Item[ ] Menu Specifies the Menu objects under a Menu object. 这看似简单的一句话其实包含了三层含义: 1、这句话说明MENU对象有一个属性为数组类型,它其
中
的各个元素记录了其所有的具体子ITEM项目,可以借助这个数组
中
各元素来访问底层的各子
菜单
; 2、这些子ITEM项目仍是MENU类型,因此可以按照第一点的逻辑继续向下层推广,借助该子ITEM的ITEM[]属性可以进而访问其所属下层的第二层子
菜单
,推而广之,即可全面遍历整个
菜单
体系的所有子
菜单
项目; 3、既然该属性是一个数组类型,那么就可以按照数组类型变量来处理,我们可以对其进行upperbound()、lowerbound()等函数操作,还可以进行数组的扩展,即添加新项目,这一点很重要,它是我们整篇文章的核心,如何利用
PB
实现动态添加
菜单
,说白了就是添加这个数组元素(读者必须对此有一个清晰的认识),同时期间有一些配套具体的实现技巧,详见下文。
ELK/ELFK(7.3 ) 企业
PB
级日志系统实战
Elastic Stack日志系统是目前企业应用广泛的一套日志解决方案。 包含的组件有Filebeat,Logstash,Elastic,Kibana等 本堂课引入Kafka 让Elastic Stack 能适应企业
PB
级的业务日志量并弥补传统ELk架构的不足 ★学完这门课程会获得什么? 首先从零开始教你部署Elastic Stack系统, 详细讲解Elastic产品,包括 Kibana.Logstash,Beats的详细讲解以及Elastic的api操作, 并如何监控如何绘图等。最后结合自己的运维过程
中
的案例讲解,让学员能更加清楚了解原理以及少走一些弯路。 目前我们公司每天产生至少8个T的数据量,历史日志保存半年。此教程足以能承担
PB
级的日志收集系统的量。此教程的背景介绍请参阅我的CSDN博客,置顶内容的第一篇博文。
pb
8
动态创建
树和
菜单
,
pb
遍历生成
菜单
,树
pb
8源码,
动态创建
树和
菜单
,及对树和
菜单
的增、删、改 效果图:http://album.hi.csdn.net/app_uploads/liubocy/20081117/021309093.p.jpg?d=20081117021615546 请注释掉tv控件的selectchanged事件代码.
动态创建
菜单
、树
pb
动态创建
树和
菜单
forward global type w_tv from window end type type cb_2 from commandbutton within w_tv end type type cb_1 from commandbutton within w_tv end type type sle_1 from singlelineedit within w_tv end type type st_1 from statictext within w_tv end type end forward global type w_tv from window integer width = 1381 integer height = 620 boolean titlebar = true string title = "Untitled" boolean controlmenu = true windowtype windowtype = response! long backcolor = 67108864 string icon = "AppIcon!" boolean center = true cb_2 cb_2 cb_1 cb_1 sle_1 sle_1 st_1 st_1 end type global w_tv w_tv on w_tv.create this.cb_2=create cb_2 this.cb_1=create cb_1 this.sle_1=create sle_1 this.st_1=create st_1 this.Control[]={this.cb_2,& this.cb_1,& this.sle_1,& this.st_1} end on on w_tv.destroy destroy(this.cb_2) destroy(this.cb_1) destroy(this.sle_1) destroy(this.st_1) end on event open;String ls_Parm, ls_temp, ls_Name, ls_title ls_Parm = Trim( Message.StringParm ) ls_temp = Right( ls_Parm, 1 ) ls_Name = Left( ls_Parm, Lenw( ls_Parm ) - 2 ) IF ls_temp = 'T' THEN ls_title = '添加 ' + ls_Name + ' 的同类' END IF IF ls_temp = 'Z' THEN ls_title = '添加 ' + ls_Name + ' 的子类' END IF IF ls_temp = 'M' THEN ls_title = '修改 ' Sle_1.text = ls_Name Sle_1.SelectText( 1, Len( ls_Name ) ) END IF title = ls_title end event type cb_2 from commandbutton within w_tv integer x = 727 integer y = 360 integer width = 457 integer height = 128 integer taborder = 20 integer textsize = -12 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Arial" string text = "退出(&E)" boolean cancel = true end type event clicked;CloseWithReturn( Parent, '' ) end event type cb_1 from commandbutton within w_tv integer x = 165 integer y = 360 integer width = 457 integer height = 128 integer taborder = 30 integer textsize = -12 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Arial" string text = "确定(&O)" boolean default = true end type event clicked;String ls_Name ls_Name = Trim( sle_1.text ) CloseWithReturn( Parent, ls_Name ) end event type sle_1 from singlelineedit within w_tv integer x = 64 integer y = 156 integer width = 1234 integer height = 128 integer taborder = 10 integer textsize = -12 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Arial" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type type st_1 from statictext within w_tv integer x = 64 integer y = 40 integer width = 457 integer height = 72 integer textsize = -12 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Arial" long textcolor = 33554432 long backcolor = 67108864 string text = "类别名称" boolean focusrectangle = false end type
PowerBuilder
1,075
社区成员
66,437
社区内容
发帖
与我相关
我的任务
PowerBuilder
PowerBuilder 相关问题讨论
复制链接
扫一扫
分享
社区描述
PowerBuilder 相关问题讨论
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章