Registriert seit: 10. Apr 2006
Ort: Leverkusen
969 Beiträge
Delphi 6 Professional
|
AW: 2DArray in der Parameterübergabe erstellen??
18. Dez 2015, 08:42
Oder eine Kombination:
Delphi-Quellcode:
type
T1DControls = Array of TControl;
T2DControls = Array of T1DControls;
procedure Set1d(var A1D : T1DControls ; C : Array of TControl);
var
i : integer;
begin
setlength(A1D,length(c));
for i := 0 to length(c) do A1D[i] := c[1];
end;
procedure TForm1.Button1Click(Sender: TObject);
var
tmp2D : T2DControls;
begin
setlength(tmp2D,2);
Set1d(tmp2d[0],[Button1,Button2,Button3]);
Set1d(tmp2d[1],[Button4,Button5,Button6]);
ShowMessage(tmp2d[1][2].Name);
end;
|
|
Zitat
|