selectrow()怎么用

l6208128 2004-12-13 10:08:26
记得这个函数可以加亮行,但不会用
最好是鼠标点哪行,哪行就加亮,请求详细过程!!!不胜感激
...全文
1879 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
handycyw 2004-12-13
  • 打赏
  • 举报
回复
一般:
在dw_1的事件event
的clicked()
if row> 0 then this.scrolltorow(row)
在rowfocuschanged()
if currentrow>0 then
this.selectrow(0,false)
this.selectrow(currentrow,true)
end if
yhl198201 2004-12-13
  • 打赏
  • 举报
回复
this.selectrow(0,false)
this.selectrow(this.getrow(),true)
hygougou 2004-12-13
  • 打赏
  • 举报
回复
clicked事件
dw.selectrow(0,false)
dw.selectrow(row,true)
huangxinru 2004-12-13
  • 打赏
  • 举报
回复
可以把代码写在dw的clicked事件中
l6208128 2004-12-13
  • 打赏
  • 举报
回复 1
rowfocuschaned事件
这个事件是什么用的,我刚接触PB,对事件知道的不是很多,麻烦详细说下,谢谢
lula 2004-12-13
  • 打赏
  • 举报
回复
在数据窗口控件的rowfocuschaned事件中加入下面代码:
this.selectrow(0,false)
this.selectrow(this.getrow(),true)
huangxinru 2004-12-13
  • 打赏
  • 举报
回复
dw.selectrow(0,false)
dw.selectrow(this.getrow(),true)
th820901 2004-12-13
  • 打赏
  • 举报
回复
This statement selects the fifteenth row in dw_employee:
PowerBuilder

dw_employee.SelectRow(15, TRUE)

Java

dw_employee.selectRow(15, true);

As the script for a DataWindow's Clicked event, this example removes highlighting from all rows and then highlights the row the user clicked.
PowerBuilder Row is an argument passed to the event script:

This.SelectRow(0, FALSE)

This.SelectRow(row, TRUE)

Java The row number is passed in the MouseEvent object:

dw_1.selectRow(0, false);

dw_1.selectRow(event.getRow(), true);
wulengbing 2004-12-13
  • 打赏
  • 举报
回复
在数据窗口画板里的backcolor里面的表达式里写:
if(currentrow()=selectrow(),255,255255255)
currentrow()是当前行,selectrow是所选行,255是蓝色。255255255是白色。把所选行显示成蓝色,不选的是白色

1,076

社区成员

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

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