Autor Beitrag
Krefti
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 164

Win XP/Vista/Win7/ubuntu
Delphi 7/2006/2009 Pro
BeitragVerfasst: Mi 11.01.06 14:41 
ich möchte über einen klick auf einen button ein neues formular anzeigen lassen, was auch klappt.., dann möchte ich auf diesem Formula ein Label array erstellen..es wird auch fehlerlos übersetzt, nur wird nichts auf dem neuen Formula angezeigt.. hab keine ahnung woran es liegt..
Kann mir jemand helfen?
Danke schon mal!

mfg



ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
    ....
 
procedure TForm1.infoclick(Sender:TObject);
  begin 
     Form3.showmodal;           //öffne ein neues formular
 end;
...
//neue unit

private
arrTextLabel : Array[0..50] of TLabel; //array wird deklariert

//hier will ich dann meine labels erstellen...

procedure TForm3.FormCreate(Sender: TObject);
var
   z : integer;
begin
     for z := 0 to 50 -1 do
         begin
            arrTextLabel[z] := TLabel.Create(Form3);
              with arrTextLabel[z] do
               begin
                Left := 50 ;
                height := 25;
                Parent := self;
                Caption := 'asklöjfhaslökjf';
                font.size:= 12;
                color := clgreen;
                visible := true;
                top := z * (arrTextLabel[z].height + 2) +50;
               end;
         end;
end;
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Mi 11.01.06 20:26 
setzemal Parent auf From3 und nicht auf self :!:
ausblenden Delphi-Quelltext
1:
2:
3:
  ...
  Parent := Form3;
  ...


(EDIT: 2 Zeichen einrücken reicht auch

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!