On Sat, 18 Mar 2006 14:23:12 +0200
"Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:
> On 18/03/06, Felipe Monteiro de Carvalho
> <[EMAIL PROTECTED]> > Let´s say you have a dialog with
> 3 buttons aligned horizontaly on it,
> > like if they were on the same line.
> >
> > Using those properties you mentioned, I know how to keep 1 button with
> > an Anchor on the left, another with a Anchor on the right, but how can
> > I keep the other button on the center??
>
> Currently working on the Compiler Options dialog, I can kinda answer this
> one. Instead of centering the middel button you can do it a little
> different. Anchor the right button to the right of the form (Bottom &
> Right). Then anchor the middle button to the right button ( top align
> the button edges) with a border of say 10. Then anchor the left
> button to the middle button again with a border of 10 and top align
> the button edge.
Or:
anchor button1 to the left (Anchors=[akLeft,akBottom])
anchor button2 center (Anchors=[akBottom])
anchor button3 to the right (Anchors=[akRight,akBottom])
Or:
Use TButtonPanel
Or:
Put the buttons on a TPanel or TGroupBox.
Anchor all buttons default (akLeft,akTop and Align=alNone)
Panel1.ChildSizing.Layout=cclLeftToRightThenTopToBottom
And now you can use the Panel1.ChildSizing, Panel1.BorderSpacing and the
ButtonX.BorderSpacing properties to setup spacing, enlarging rules,
shrinking rules and alignment.
TRadioGroup and TCheckGroup use these properties for their grids.
> You need to use the Anchor property editor to align to different
> control. The Object Inspector doesn't show that much detail.
>
> Note: This solves most problems, but not all. For the Compiler
> Options dialog, I still needed a OnResize event.
For what?
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives