You can also use Constraints to set height/width of children with
ChildSizing.


On Sun, Nov 10, 2013 at 10:43 PM, Valdas Jankūnas <[email protected]> wrote:

> 2013.11.10 18:24, William Oliveira Ferreira rašė:
>
>  I think you could also use anchors
>>
>
> Anchors not helps if Parent.Autosize is True.
>
> I found better solution:
> - Panel.AutoSize := True;
> - Panel.ChildSizing.ControlsPerLine := MaxInt;
> - Panel.ChildSizing.Layout := cclLeftToRightThenTopToBottom;
> - Every Child.BorderSpacing.Left := 2;
> - Every Child.BorderSpacing.CellAlignVertical := ccaCenter;
> - Every Child.AutoSize := True;
>
>
> If you want to adjust Child's Width (by default you cannot) then you must
> use overridden procedure "CalculatePreferredSize" in class of that Child,
> in which:
>
>    inherited CalculatePreferredSize(PreferredWidth, PreferredHeight,
> WithThemeSpace);
>    PreferredWidth := Width;
>
>
>
> --
>   Valdas Jankūnas
>
> --
> _______________________________________________
> Lazarus mailing list
> [email protected]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>



-- 
Shalom,
Avishai
[email protected]
אבישי גוֹר
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to