<div dir="ltr">You can also use Constraints to set height/width of children with ChildSizing.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Nov 10, 2013 at 10:43 PM, Valdas Jankūnas <span dir="ltr"><<a href="mailto:zmuogs@gmail.com" target="_blank">zmuogs@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2013.11.10 18:24, William Oliveira Ferreira rašė:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think you could also use anchors<br>
</blockquote>
<br></div>
Anchors not helps if Parent.Autosize is True.<br>
<br>
I found better solution:<br>
- Panel.AutoSize := True;<br>
- Panel.ChildSizing.<u></u>ControlsPerLine := MaxInt;<br>
- Panel.ChildSizing.Layout := cclLeftToRightThenTopToBottom;<br>
- Every Child.BorderSpacing.Left := 2;<br>
- Every Child.BorderSpacing.<u></u>CellAlignVertical := ccaCenter;<br>
- Every Child.AutoSize := True;<br>
<br>
<br>
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:<br>
<br>
inherited CalculatePreferredSize(<u></u>PreferredWidth, PreferredHeight, WithThemeSpace);<br>
PreferredWidth := Width;<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
-- <br>
Valdas Jankūnas<br>
<br>
--<br>
______________________________<u></u>_________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.<u></u>freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.<u></u>freepascal.org/mailman/<u></u>listinfo/lazarus</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Shalom,<br>Avishai<br><a href="mailto:avishai.gore@gmail.com">avishai.gore@gmail.com</a><br>אבישי גוֹר
</div>