Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
Turbo Delphi für Win32
|
Re: Erstellen eines Eingabeformulars
2. Apr 2006, 01:19
Aso, ich dachte das geschieht schon bei Create(Self).
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
a: array of array of TCheckBox;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var xcount, ycount, I,J: Integer;
begin
xcount:=5;
ycount:=10;
setlength(a,xcount,ycount);
for I:=0 to xcount-1 do
for J:=0 to ycount-1 do
begin
a[I,J]:=TCheckBox.Create(Self);
a[I,J].parent:=self;
a[I,J].width:=16;
a[I,J].height:=16;
a[I,J].left:=8+I*24;
a[I,J].top:=8+J*24;
a[I,J].visible:=True;
a[I,J].enabled:=True;
end;
end;
end.
Manuel Eberl „The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
|
|
Zitat
|