以下是引用fanjinyu9108在2016-3-12 21:29:57的发言:
我试了下,好像不行啊,点击按钮,显示“找不到TEXT类定义”
我试了下,好像不行啊,点击按钮,显示“找不到TEXT类定义”
DEFINE CLASS _text as text 没有见到自定义的 text 类,应该是想引用VFP的 TextBox 类吧?
你没改这里吧?
** test.prg CREATE CURSOR tt (f1 I, f2 I) INSERT INTO tt VALUES (101, 202) of = CREATEOBJECT("form1") of.show(1) CLEAR ALL DEFINE CLASS form1 as Form ADD OBJECT grid1 as _Grid ENDDEFINE DEFINE CLASS _Grid as grid Visible = .t. ADD OBJECT Column1 as _Column ADD OBJECT Column2 as _Column ENDDEFINE DEFINE CLASS _Column as Column Visible = .t. ADD OBJECT Text1 as _TextBox ENDDEFINE DEFINE CLASS _TextBox as TextBox Visible = .t. PROCEDURE Click MESSAGEBOX(this.Parent.Name + "." + this.Name + ".Click") ENDPROC ENDDEFINE