(1)在数据窗口控件dw_1创建用户自定义事件“Enter”,事件ID为pbm_dwnprocessenter
(2)在数据窗口控件dw_1的自定义事件Enter中,程序代码为
if this.accepttext() < 0 then
return 1
end if
//判断是否为最后一行
if this.getcolumn( ) = long(this.describe("Datawindow.column.count")) then
if this.getrow( ) = this.rowcount( ) then
this.insertrow(0)
this.scrolltorow(this.getrow( ) + 1)
this.setcolumn(1)
return 1
end if
end if
//发送Tab键消息
send(Handle(this),256,9,long(0.0))
return 1