Autor Beitrag
motion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 295

XP, Linux
D7 Prof
BeitragVerfasst: Mi 02.11.05 21:48 
In einer TScrollbox erzeuge ich dynamisch Tcontrol Abkömmlinge. Funktioniert wunderbar. Sobald die Objekte größer/mehr werden, als das Fenster darstellen kann, werden automatisch die Scrollleisten aktiviert. Dadurch verringert sich aber schlagartig meine nutzbare Boxbreite. Diesen Sprung möchte ich verhindern, indem die Scrollbar *immer* aktiv sein soll, selbst wenn die Scrollbox leer oder wenige Elemente enthält.
Eine Idee wie das gehen könnte?
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Do 03.11.05 07:53 
Hallo,

eine Möglichkeit ist VertScrollBar.Margin auf ScrollBox1.Height,
und HorzScrollBar.Margin entsprechend auf ScrollBox1.Width.
Das aber schon im OI einstellen, dann werden sie immer angezeigt.

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
motion Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 295

XP, Linux
D7 Prof
BeitragVerfasst: Do 03.11.05 08:35 
Excellent, funktioniert. Vielen Dank
AMI
Hält's aus hier
Beiträge: 13


Delphi 7
BeitragVerfasst: Do 02.03.06 10:11 
Was ist mit "OI" gemeint? Wo ist diese Einstellung?
Ich kriege es nicht hin, die Scrollbar per default anzuzeigen.

Grüße

AMI
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Do 02.03.06 18:18 
Hallo,

mit OI ist der Objekt-Inspektor gemeint.
Wenn die ScrollBox auf der Form markiert ist, dann findet man im OI die Eigenschaft VertScrollBar.
Das ist ein TControlScrollBar-Object und hat die Eigenschaft Margin, diese setzt man auf den Wert von ScrollBox1.Height.

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
AMI
Hält's aus hier
Beiträge: 13


Delphi 7
BeitragVerfasst: Fr 03.03.06 08:29 
Ahhhh

Danke!!!

Man muß auch noch die "AutoScroll" Eigenschaft auf "True" setzen, sonst klappt es nicht.

Grüße

AMI