今天是公元: 20250504日 星期   农历: 乙巳初七 2加入收藏 | 设为首页 | 会员中心
您当前的位置:首页 > 科文与生活 > PB数据编程

PowerBuilder 编程技巧一

日期:2025-02-03   来源:本站整理   作者:本站  点击:38

1、pb string时去除小数右边的0
    先转double 再string.   即:string(double(data))

2、line类型的graph数据窗口设置点的样式
int i
dw_gr.setredraw(false)
for i = 1 to dw_gr.SeriesCount("gr_1") //你的数据窗口中,实际可能不是gr_1
    //NoSymbol!可以换成其他,具体查看帮助
   // dw_gt.SetSeriesStyle('gr_1', dw_gr.SeriesName('gr_1',i), NoSymbol!)
    dw_1.SetSeriesStyle("gr_1", "F", SymbolSolidCircle! ) 修改成圆点
next
dw_gr.setredraw(true)
 
3、带参数调用事件:Event ue_Export( a,b ...)

4、//先屏蔽掉祖先窗体的事件,然后再调用祖先的代码
call super::ue_mousemove

5、取最初从数据库中检索的值、即原始值
object.col.Primary.Original[1]
object.col.Primary[1]
dw_dd.GetItemString(il_row,"s"+is_col,Primary!,true))

6、取数据窗口下拉dw的显示数据:
dw.describe("Evaluate('lookupdisplay(列名)',"+string(行)+")")

7、取得列的总数
numcols = long(dw.Describe("DataWindow.Column.Count"))
numcols = long(dw.Object.Datawindow.Column.Count)

8、//数据窗口同时选择两行
long ll_row
If mod(currentrow,2)=1 then ll_row = currentrow
If mod(currentrow,2)=0 then ll_row = currentrow -1
this.selectrow(0,false)
this.selectrow(ll_row,true)
this.selectrow(ll_row +1,true)

9、//PB关于retrieve效率问题
ls_condition = 'a'+'%'
dw_1.retrieve(ls_condition)

ls_condition = 'a'
dw_1.retrieve(ls_condition+'%')

在数据窗口中sql的where条件的写法,尽量变量中直接含有'%',不要用表达式计算得出

10、修改符号类型
dwcontrol.SetSeriesStyle ( string graphcontrol, string seriesname, grSymbolType symbolvalue )
NoSymbol! 0 None
SymbolHollowBox! 1 A hollow box
SymbolX! 2 An X
SymbolStar! 3 A star
SymbolHollowUpArrow! 4 An outlined up arrow
SymbolHollowDownArrow! 5 An outlined down arrow
SymbolHollowCircle! 6 An outlined circle
SymbolHollowDiamond! 7 An outlined diamond
SymbolSolidBox! 8 A filled box
SymbolSolidDownArrow! 9 A filled down arrow
SymbolSolidUpArrow! 10 A filled up arrow
SymbolSolidDiamond! 11 A filled diamond
SymbolSolidCircle! 12 A filled circle
SymbolPlus! 13 A plus sign

上一篇: PowerBuilder中操作Excel的技巧集
下一篇: 返回列表
相关文章
热门文章
  1. 好正好软件-成绩管理分析 使用手册 简介
  2. 好正好软件-课程表管理 使用手册 简介
  3. 成绩管理分析-使用手册 成绩录入与汇总处
  4. 成绩管理分析-使用手册 成绩动态对比分析
  5. PowerBuilder中操作Excel的技巧集
  6. 成绩管理分析-使用手册 排考试号
  7. 成绩管理分析-使用手册 基本设置
  8. 成绩管理分析-使用手册 成绩综合分析
  9. PowerBuilder 编程技巧一
   关于我们
服务联系
新闻公告
好正好教育
好正好软件(教育管理)
Copyright (c) 2024 好正好教育