Lazarus

Using the Lazarus IDE => Designer => Topic started by: stem on December 31, 2019, 02:27:16 pm

Title: Grid layout with AnchorEditor?
Post by: stem on December 31, 2019, 02:27:16 pm
Hi,

is it possible to create a "grid layout" with the AnchorEditor?

See the attachment: I would like to have my components like in groupbox "Version 1", i.e. the second column begins at the right of the longest item of the first column.

Unfortunately I only can create "Version 2", i.e. the x positions of the items in the second column are not the same.

I'm testing my application with different scaling/DPI values of the operating system.

Thank you!

stem
Title: Re: Grid layout with AnchorEditor?
Post by: wp on December 31, 2019, 02:36:47 pm
Use GroupBox' ChildSizing:
- ControlsPerLine = 2
- Layout = cclLeftToRightThenTopToBottom
- HorizontalSpacing = (some decent value), as well as LeftRightSpacing
- VerticalSpacing = (some decent value), as well as TopBottomSpacing

If you want to left-align the right column to the center of the GroupBox I'd use the AnchorEditor instead and add a narrow helper bevel (Shape = bsSpacer) which I'd center-align with the AnchorEditor within the GroupBox. Then all labels of the first column will be left-aligned to the Groupbox, and those in the second panel will be left-aligned to the bevel.
Title: Re: Grid layout with AnchorEditor?
Post by: stem on January 02, 2020, 01:07:47 pm
Thank you for your help!
TinyPortal © 2005-2018