CREATE CURSOR tt (姓名 C(8), 性别 C(2))
INSERT INTO tt VALUES ("张三", "男")
INSERT INTO tt VALUES ("三姑", "女")
INSERT INTO tt VALUES ("李四", "男")
INSERT INTO tt VALUES ("六婆", "女")
INSERT INTO tt VALUES ("王五", "男")
INSERT INTO tt VALUES ("七婶", "女")
GO TOP
of = CREATEOBJECT("form1")
of.show(1)
DEFINE CLASS form1 As Form
ADD OBJECT grid1 as grid
PROCEDURE grid1.Init
this.Column2.DynamicForeColor = [IIF(性别=="男", 0x0000FF, 0xFF0000)]
ENDPROC
ENDDEFINE