类在使用之前要创建,请测试 var Rule: array[1..100] of TRuleGroup; //这是一个我建的类,继承于TRadioGroup i: integer; begin for i:= 1 to 100 do Rule[i] := TRuleGroup.create(self); …… …… while not query1.Eof do begin rule[i].Caption:=DBedit1.Text; rule[i].Left:=x; rule[i].Top:=y; …… …… i:=i+1; query1.FindNext; end; end;
Delphi和C++不一样
类要手工创建
rule[i]:=TRuleGroup.Create;
var
Rule: array[1..100] of TRuleGroup; //这是一个我建的类,继承于TRadioGroup
i: integer;
begin
for i:= 1 to 100 do
Rule[i] := TRuleGroup.create(self);
……
……
while not query1.Eof do
begin
rule[i].Caption:=DBedit1.Text;
rule[i].Left:=x;
rule[i].Top:=y;
……
……
i:=i+1;
query1.FindNext;
end;
end;
后还是不行
他告诉我控件没有父窗体
我这些都写在Form1底下,怎么把它的父窗体设为Form1啊
帮帮忙,谢谢了!!
未免钻牛角尖了吧
谁会阿,帮帮我
怎么设设rule[i]的父窗体为form1啊
后还是不行
他告诉我控件没有父窗体
我这些都写在Form1底下,怎么把它的父窗体设为Form1啊
帮帮忙,谢谢了!!