Command1代码:
thisform.pageframe1.page1.commandgroup1.command1.enabled=.f.
thisform.pageframe1.page1.commandgroup1.command2.enabled=.f.
thisform.pageframe1.page1.commandgroup1.command3.enabled=.t.
thisform.pageframe1.page1.commandgroup1.command4.enabled=.t.
thisform.pageframe1.page1.grid1.setfocus
thisform.pageframe1.page1.refresh
go top
Command2代码:
thisform.pageframe1.page1.grid1.setfocus
thisform.pageframe1.page1.refresh
skip -1
if bof()
messagebox("已是第一条记录!",48,"提示")
thisform.pageframe1.page1.commandgroup1.command1.enabled=.f.
thisform.pageframe1.page1.commandgroup1.command2.enabled=.f.
else
thisform.pageframe1.page1.commandgroup1.command1.enabled=.t.
thisform.pageframe1.page1.commandgroup1.command2.enabled=.t.
endif
thisform.pageframe1.page1.commandgroup1.command3.enabled=.t.
thisform.pageframe1.page1.commandgroup1.command4.enabled=.t.
Command3代码:
thisform.pageframe1.page1.grid1.setfocus
thisform.pageframe1.page1.grid1.refresh
skip
if eof()
messagebox("已是最后一条记录!",48,"提示")
thisform.pageframe1.page1.commandgroup1.command3.enabled=.f.
thisform.pageframe1.page1.commandgroup1.command4.enabled=.f.
else
thisform.pageframe1.page1.commandgroup1.command3.enabled=.t.
thisform.pageframe1.page1.commandgroup1.command4.enabled=.t.
endif
thisform.pageframe1.page1.commandgroup1.command1.enabled=.t.
thisform.pageframe1.page1.commandgroup1.command2.enabled=.t.
Command4代码:
thisform.pageframe1.page1.commandgroup1.command1.enabled=.t.
thisform.pageframe1.page1.commandgroup1.command2.enabled=.t.
thisform.pageframe1.page1.commandgroup1.command3.enabled=.f.
thisform.pageframe1.page1.commandgroup1.command4.enabled=.f.
thisform.pageframe1.page1.grid1.setfocus
thisform.pageframe1.page1.grid1.refresh
go bottom
另外还需要在grid1的arftrowcolchange中写入
this.setall('dynamicbackcolor','iif(this.activerow< >recno(),rgb(238,251,255),rgb(153,204,255)','column')
在表格控件的每列的text1控件的GotFocus事件中添加以下代码:
this.backcolor=rgb(153,204,255)
给我加分哦! 给我加分哦! 给我加分哦! 给我加分哦! 给我加分哦! 给我加分哦! 给我加分哦! 给我加分哦! 给我加分哦! 给我加分哦! 给我加分哦! 给我加分哦! 给我加分哦! 给我加分哦!