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
|