L
liaodm
Unregistered / Unconfirmed
GUEST, unregistred user!
如何將控件定義成變量就如下面一樣:
說明:窗體內放有11個TComboBox控件,依次為ComboBox1..ComboBox11
var
myarry :array [0..10] of TSringList;
i:integer;
begin
i:=0;
while i<11 do
begin
myarry:=TStringList.Create;
myarry.Clear;
myarry.AddStrings(ComboBox1.Items);//我希望這裡的ComboBox1換成一個變量
i=i+1;
end;
說明:窗體內放有11個TComboBox控件,依次為ComboBox1..ComboBox11
var
myarry :array [0..10] of TSringList;
i:integer;
begin
i:=0;
while i<11 do
begin
myarry:=TStringList.Create;
myarry.Clear;
myarry.AddStrings(ComboBox1.Items);//我希望這裡的ComboBox1換成一個變量
i=i+1;
end;