Autor Beitrag
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Fr 12.01.07 19:36 
Ich erstelle während der Laufzeit Tabs in einer Pagecontrol-Komponente. In diesen werden x Labels erstellt und untereinander angeordnet. (Label.top:=i*Label.height;)
Jetzt sind das aber mehr Labels als Platz ist. Also soll das ganze mit einem vertikalen Scrollbalken versehen werden.
Aber wie? Autoscroll gibts ja nich...
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Fr 12.01.07 19:47 
Einfach ne Scrollbox draufpacken.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Fr 12.01.07 19:53 
hmm...wie verwende ich die? *michdummfühl*
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Fr 12.01.07 19:59 
Scrollbox auf das Pagecontrol und deine Kompos auf die Scrollbox. (Brauchst dann halt mehrere)

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Sa 13.01.07 12:33 
hmm...sry ich verstehs nich... =(
kannste ein bsp machen wo ein tab erzeugt wird darauf vll 20-30 labels und dann scrollbar?
Andidreas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114

Windows XP Pro
BDS 2006
BeitragVerfasst: Sa 13.01.07 14:00 
Versuch es mal damit

ausblenden Delphi-Quelltext
1:
2:
3:
  private
    { Private-Deklarationen }
  Lab: array[0..29] of TLabel;


ausblenden 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:
procedure TForm1.Button1Click(Sender: TObject);
var
  I: Integer;
  TabSheet: TTabSheet;
  ScrollBox: TScrollBox;
begin
  with PageControl1 do
  begin
    TabSheet := TTabSheet.Create(PageControl1);
    with TabSheet do
    begin
      Caption := Format('Neu %d', [PageCount + 1]);
      PageControl := PageControl1;
    end;
  end;
  ScrollBox := TScrollBox.Create(Self);
  ScrollBox.Parent := TabSheet;
  ScrollBox.Align := alClient;
  for I := 0 to 29 do
  begin
    Lab[I] := TLabel.Create(Self);
    Lab[I].Parent := ScrollBox;
    Lab[I].Top := Lab[I].Height + 15 * I;
    Lab[I].Left := 10;
    Lab[I].Width := 50;
    Lab[I].Caption := 'Label' + IntToStr(I);
  end;
end;
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Sa 13.01.07 14:57 
Danke...das geht super!