CREATE CURSOR 数据表 (选择 L, 区号 c(10), 城市 c(10) )
INSERT INTO 数据表 VALUES (.T.,'021','上海')
INSERT INTO 数据表 VALUES (.F.,'010','北京')
INSERT INTO 数据表 VALUES (.T.,'020','广州')
GO TOP
BROWSE NAME GrdCur NOWAIT
GrdCur.column1.width = 50
GrdCur.column2.width = 100
GrdCur.column3.width = 100
GrdCur....
表格 INIT 事件代码
thisform.grid1.highlight=.f.
thisform.grid1.highlightrow=.f.
For i=1 to Fcount()
thisform.grid1.columns(i).text1.backstyle=1
thisform.grid1.columns(i).text1.bordercolor=rgb(255,0,0)
thisform.grid1.columns(i).text1.borderstyle=1
thisform.grid1.columns(i)....
* 表格控件INIT事件
THISFORM.GRID1.ADDCOLUMN(1) && 在左边插入列。
THISFORM.GRID1.COLUMNS(THISFORM.GRID1.COLUMNCOUNT).NAME = "NewColumn"
THIS.COLUMNS(THISFORM.GRID1.COLUMNCOUNT).HEADER1.CAPTION=[序号]
THISFORM.GRID1.NEWCOLUMN.CONTROLSOURCE = "PADL(RECNO(),LEN(TRANSFORM(RECCOUNT())),[0])"
PUBLIC oForm
oForm = NEWOBJECT("Form1")
oForm.Show
RETURN
DEFINE CLASS Form1 As Form
Height = 300
Width = 420
Add Object Grid1 As Grid
PROCEDURE Load
CREATE CURSOR TEMP (F1 C(10), F2 C(10), F3 I)
INSERT INTO TEMP VALUES ("ABC", "123...
* 在表格的INIT事件中写入
This.SetAll("DynamicFontName","Iif(RECNO()=Reccount(),'黑体','宋体')","Column")
This.SetAll("DynamicFontSize","Iif(RECNO()=Reccount(),16,10)","Column")
This.Setall("DynamicBackColor","Iif(Recno()=Reccount(),Rgb(255,255,255),Rgb(255,0,0)","Column")