[Lazarus] qurstion in Button Alignment

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Feb 25 07:31:41 CET 2010


On Thu, 25 Feb 2010 00:12:36 +0200
ik <idokan at gmail.com> wrote:

>  On Tue, Feb 23, 2010 at 21:02, ik <idokan at gmail.com> wrote:
> 
> > 2010/2/23 Mattias Gärtner <nc-gaertnma at netcologne.de>
> >
> >> Zitat von Duncan Parsons <D.Parsons at seamsltd.com>:
> >>
> >>
> >>  [...]
> >>>
> >>> I wish to create a component that gives 10 buttons aligning 5 buttons on
> >>> each side.
> >>> The thing is, that I want to make both sides resize using anchors or
> >>> something like that.
> >>> The resizing should be both on width and height of the buttons but it
> >>> can shrink up to a given size.
> >>>
> >>> The thing that I do not understand how to do, is to be able to
> >>> grow/shrink both sides in width without covering each other.
> >>> So how do I do it properly ?
> >>>
> >>
> >> Layout=cclTopToBottomThenLeftToRight
> >> ChildSizing.ControlsPerLine=5
> >> EnlargeHorizontal=crsScaleChilds
> >>
> >
> > Thanks I'll try it out.
> >
> 
> It works, however the height of the buttons are very small, and I can't change it.
> Is there a way to scale the height (I don't mind the width with it) ?

Have you set the Buttons AutoSize to true?

You can also set the Buttons Constraints.MinHeight to some value
(e.g. 25).

Mattias




More information about the Lazarus mailing list