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: Di 16.01.07 15:19 
hi zusammen..

hab mal ne ganz kurze frage..

Und zwar hab ich auf meinem Formular eine Menuleiste oben, dann eine TListBox und einen TButton..
Die listbox ist mit links und oben verankert, so dass sie sich, wenn der Anwender das Formular größer oder kleiner macht anpasst, wie mache ich es, dass der button immer im gleichen abstand unterhalb der listbox mitverschoben wird????

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:
lbDateiListe := TListBox.Create(self);
        with lbDateiListe do
        begin
             parent := self;
             visible := false;
             Anchors := [akLeft,akTop,akRight,akBottom];
             top := 10;
             left := 10;
             width := Form1.Width - 35;
             height := Form1.Height - 130;
             Perform(LB_SetHorizontalExtent, 1000, Longint(0));
        end;

       btnExport := TButton.Create(self);
       with btnExport do
       begin
            parent := self;
            Anchors := [akLeft,akTop];
            top := lbDateiListe.Height +20;
            left := 10;
            visible := false;
            Caption := 'Datei Lesen';
       end;


was muss ichn bei btnExport reinschreiben, dass es so funktioniert wie ich es vorstelle?

Vielen Dank für eure mühe!!

bye
perry5
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 102



BeitragVerfasst: Mi 17.01.07 00:08 
Theoretisch müsste dien Fenster ja ne ResizeNachricht kreigen. Die bearbeitest du, guckst dir die aktelle Position der Liste an, und setzt die des Buttons entsprechend.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 17.01.07 01:38 
Moin!

Warum nicht einfach:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
       btnExport := TButton.Create(self);  
       with btnExport do  
       begin  
            parent := self;  
            Anchors := [akLeft,akBottom];  
            top := lbDateiListe.Height +20;  
            left := 10;  
            visible := false;  
            Caption := 'Datei Lesen';  
       end;

:?: ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Krefti Threadstarter
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 17.01.07 08:02 
Vielen Dank..