按键触发


1.登录窗口中的Key事件中编写捕获按键代码:

if KeyDown(KeyEnter!) then

if GetFocus()=Sle_name then

    Sle_password.Setfocus()
End if

If GetFocus()=Sle_password then


   cb_ok.triggerevent(clicked!)


end if


end if


Sle_name.Setfocus()

 

2.判断是否为最后一行、最后一列,则增加新行并光标下移;否则光标直接后移

if this.GetColumn()=Long(this.object.datawindow.column.count) and this.GetRow()=this.RowCount() then

    this.InsertRow(0)

    this.scrollToRow(this.GetRow()+1)

    this.setcolumn(1)

    return  1

end if

3.发送tab键消息

Send(Handle(this),256,9,long(0,0))

return 1

4.触发cb_2中的单击事件

cb_2.triggerevent(clicked!)
cb_2.event clicked()
cb_2.triggerevent("clicked")

5.基于按钮的分页功能

ScrollFirstPage 
ScrollLastPage
ScrollNextPage
ScrollPriorPage
原文地址:https://www.cnblogs.com/lvk618/p/3462691.html