可以
参考示例
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
CREATE CURSOR tt (f1 L, f2 I)
FOR i=1 TO 10
INSERT INTO tt VALUES (i%2==0, i)
ENDFOR
GO TOP
of = CREATEOBJECT("form1")
of.Show(1)
RETURN
DEFINE CLASS form1 as Form
AutoCenter = .T.
ADD OBJECT cmd1 as commandbutton WITH top=10,left=10,height=22,caption="Delete"
ADD OBJECT grid1 as Grid WITH top=40,left=10,RecordSource="tt"
PROCEDURE grid1.Init
this.Column1.ControlSource = "tt.f1"
this.Column1.Sparse = .F.
this.Column1.RemoveObject("Text1")
this.Column1.AddObject("Check1", "CheckBox")
this.Column1.Check1.Visible = .T.
ENDPROC
PROCEDURE cmd1.click
SELECT * FROM tt WHERE !tt.f1 INTO CURSOR tmp
SELECT tt
ZAP
APPEND FROM DBF("tmp")
GO TOP
thisform.grid1.setfocus
ENDPROC
ENDDEFINE
[此贴子已经被作者于2020-4-1 16:04编辑过]