What I don't like about ChildSizing is if you need to change the order of controls it can be difficult. And here's something you should try. Have a TPanel as one of the Children - get everything set the way you want with ChildSizing - now add a TLabel to the TPanel.
Using LeftAlign it's only a matter of dragging the control to the location you want. BorderSpacing and Constraints gives me all the control I need (so far - I'm still playing with it). On Sun, Nov 10, 2013 at 11:03 PM, Avishai <[email protected]> wrote: > 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] > אבישי גוֹר > -- Shalom, Avishai [email protected] אבישי גוֹר
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
