关于在数据窗口中删除行的问题!!!!!!!!!!!!!!!!!!!!!!!!!!

taoguang2 2003-05-29 11:06:24
有一个数据窗口,我选中某行的时候,当我按下delete键,就把该行删除掉,不知道怎么做????不要回答我用按钮做!
...全文
18 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
bastenlee 2003-05-29
  • 打赏
  • 举报
回复
定义keydown事件 对应pbm_dwnkey
if key = KeyDelete! then
this.deleterow(this.getrow())
end if
txchen 2003-05-29
  • 打赏
  • 举报
回复
定义keydown事件 对应pbm_dwnkey
if key = KeyDelete! then
if this.getrow()>0 then this.deleterow(this.getrow())
end if
poors 2003-05-29
  • 打赏
  • 举报
回复
同意心魔
zyhtz 2003-05-29
  • 打赏
  • 举报
回复
同意楼上二位
在数据窗口中定义一个键盘事件,判断是否是按下了delete
devil_heart 2003-05-29
  • 打赏
  • 举报
回复
定义keydown事件 对应pbm_dwnkey
if key = KeyDelete! then
this.deleterow(this.getrow())
end if
ahuanghp 2003-05-29
  • 打赏
  • 举报
回复
为数据窗口定义一个KEYDOWN事件.
if KeyDown(keydelete!) then
this.deleterow(row)
end if
不知键值是不是keydelete!,随便手本书查一下.VB的入门书里就有.

小伙子要谦虚点你说话,我不爱听.
oyj 2003-05-29
  • 打赏
  • 举报
回复
其实用按钮也可以,按键clicked!事件如下:

if dw.getrow()>0 then dw.deleterow(dw.getrow())


然后在数据窗口中自定义事件,id为pbm_dwnkey

if key=keydelete! then
button.triggerevent(clicked!)
end if

这样有两种方法删除了

1,075

社区成员

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

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