如何在PB中用回车键来代替TAB键呢,下面给出了一个较简单的实现源代码。
//在数据窗口当中按下回车键之后,焦点移动到后面的字段,如从最后移动,则自动跳转到下一行
send(handle(this),256,9,long(0,0))
//窗口当中的enter事件!在datawindow的事件当中新建一个自定义事件ue_enter,在even_id当中paste"pbm_dwnprocessenter"
long      ll_row,ll_RowCount
integer li_col,li_colcount
li_col        = dw_1.GetColumn()
li_ColCount = long(describe(dw_1,"datawindow.column.count"))
if li_col     = li_ColCount then
    ll_row      = dw_1.GetRow()
    ll_RowCount = dw_1.RowCount()
    if ll_row = ll_RowCount then
       ll_row = dw_1.InsertRow(0)
             dw_1.setredraw(false)   
       scrolltorow(dw_1,ll_Row)
       setrow(dw_1,ll_Row)
       setcolumn(dw_1,1)  
       dw_1.setredraw(true)
       dw_1.SetFocus()
           dw_1.modify("datawindow.horizontalscrollposition=1")
       return 1
    end if
end if
send(handle(this),256,9,long(0,0))
return 1
新闻热点
疑难解答