给你参考一下。
我觉得这个很简单啊。
定义事件 pbm_dwnkey
string ls_col
choose case key
case keyenter!
ls_col = upper(this.getcolumnname())
If ls_col = '列名' then
this.Object.DataWindow.HorizontalScrollPosition = '0'
end if
end choose
'看不看到'
计算机是没办法判断的了。只有你来限制一下了
比如在某一列才用这个方法
那么你可以这样写
If DwContrl.GetColumnName() = '列名' Then
DwContrl.Object.DataWindow.HorizontalScrollPosition = '0'
End If