// 注意事项:数据窗口dw_query的对象中text命名须用默认值, // 即:列名+ _t // 柯建勋 于1999年4月27日 //-----------------------------------------------------------------------//
long ll_column_count long ll_i long ll_row string ls_column string ls_column_name
this.settransobject(sqlca) ll_row = this.insertrow(0) this.setitem(ll_row,'compare','=') this.setitem(ll_row,'and_or','and')
ll_column_count = long(dw_query.Describe("DataWindow.Column.Count")) //总列数
this.ClearValues("column_name") for ll_i = 1 to ll_column_count if dw_query.Describe("#"+string(ll_i)+".Visible") = '1' then ls_column = dw_query.Describe("#"+string(ll_i)+".Name") //列名 ls_column_name = dw_query.Describe(ls_column + "_t.text") //列名对应文本 this.SetValue("column_name", ll_i , ls_column_name + "~t" + ls_column) end if next
2、定义dw_query_condition的用户事件ue_Enterkeydown,Event ID选择pbm_dwnProcessEnter。 当我们按下Enter键时,将触发此事件。在ue_Enterkeydown事件中加入如下脚本:
//回车键(Enter)切换列焦点 long ll_column_count long ll_column
ll_column_count = long(this.Describe("DataWindow.Column.Count"))
ll_column = this.getcolumn() if ll_column = ll_column_count then cb_add.tr上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页
|