试一下滚动条可以移到最左边
*** test.prg ***
CREATE CURSOR tt (f1 I, f2 I, f3 I, f4 I, f5 I, f6 I, f7 I, f8 I, f9 I, f10 I, f11 I, f12 I, f13 I, f14 I, f15 I, f16 I, f17 I, f18 I, f19 I, f20 I)
FOR i=1 TO 10
APPEND BLANK
ENDFOR
GO TOP
of = CREATEOBJECT("form1")
of.show
READ EVENTS
RETURN
DEFINE CLASS Form1 As Form
ADD OBJECT grid1 as grid
ADD OBJECT cmd1 as commandbutton WITH top=this.Height-40,left=10,caption="<--"
ADD OBJECT cmd2 as commandbutton WITH top=this.Height-40,left=130,caption="-->"
PROCEDURE cmd1.click
thisform.grid1.ActivateCell(thisform.grid1.ActiveRow, 1)
thisform.grid1.column1.SetFocus
ENDPROC
PROCEDURE cmd2.click
thisform.grid1.ActivateCell(thisform.grid1.ActiveRow, thisform.grid1.columncount)
thisform.grid1.columns(thisform.grid1.columncount).SetFocus
ENDPROC
PROCEDURE UnLoad
CLEAR EVENTS
ENDPROC
ENDDEFINE
[此贴子已经被作者于2019-8-8 10:43编辑过]