Einzelnen Beitrag anzeigen

Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#2

Re: Erstellen eines Eingabeformulars

  Alt 2. Apr 2006, 00:07
Ich hab grade eben mal diesen Code geschrieben, seltsamerweise funktioniert er nicht...

Die Checkboxen werden gar nicht angezeigt.

Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;
  a: array of array of TLabel;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(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]:=TLabel.Create(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;
a[I,J].Color:=clred;
Application.ProcessMessages;
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
  Mit Zitat antworten Zitat