在pb数据窗口实现选中多行数据

来源:互联网 发布:php修改上传文件大小 编辑:程序博客网 时间:2024/05/18 22:56

long l_lastrow=1 //声明实例变量并置初值(上次点击行)datawindow的click事件代码:long iif keydown(keyshift!) then //如果按下Shift键if row>l_lastrow then for i=l_lastrow to row this.selectrow(i,true) //选中当前行和上次单击行之间的所有数据行 nextelse for i=l_lastrow to row step -1 this.selectrow(i,true) //选中当前行和上次单击行之间的所有数据行 nextend ifelseif keydown(keycontrol!) then //如果按下Ctrl键if this.isselected(row) then //如果当前行被选中 this.selectrow(row,false) //取消选中该行else this.selectrow(row,true) //选中该行end ifelse //没有功能键按下for i=1 to this.rowcount() this.selectrow(i,false) //取消所有数据行选中nextl_lastrow=row //将当前行号赋给实例变量l_lastrowthis.selectrow(row,true) //选中当前行end if

 

http://hi.baidu.com/jiaxw/blog/item/b158d31f38107bf2e0fe0b92.html

原创粉丝点击