Autor Beitrag
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 28

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: So 12.06.05 18:54 
hallo, ich brauche sowas wie ein formular, ich möchte eine unbegrenzte anzahl von labels zur laufzeit erstellen und da das irgendwann zu lang wird, soll man dort nach unten scrollen können, so wie beim formular, nur soll es eben nicht das formular sein, sondern nur ein teil im formular, wie mache ich das ?
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: So 12.06.05 18:57 
Ich habe genau ein Wort für Dich: TScrollBox ;-)

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 28

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: So 12.06.05 18:59 
wunderschön, danke TUFKAPL :mrgreen:

Dank deinem Komponenten Array Tutorial auch auf anhieb mit 20 labels :idea:
ausblenden Delphi-Quelltext
1:
2:
  private
    FLabels: Array of TLabel;

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
procedure TForm1.Button1Click(Sender: TObject);
var
  i : Integer;
  mylabel : Tlabel;
begin
  SetLength(Flabels, 20);
  for i := 0 to High(Flabels) do
  begin
    Flabels[i] := Tlabel.Create(self);
    with Flabels[i] do
    begin
      parent := scrollbox1;
      left := 10;
      top := i * 25;
      name := 'label' + IntToStr(i + 1);
      caption := name;
    end;
  end;
end;

bist halt der Größte :D