Recent

Author Topic: Grid layout with AnchorEditor?  (Read 1945 times)

stem

  • Jr. Member
  • **
  • Posts: 88
Grid layout with AnchorEditor?
« 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

wp

  • Hero Member
  • *****
  • Posts: 11912
Re: Grid layout with AnchorEditor?
« Reply #1 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.
« Last Edit: December 31, 2019, 02:49:46 pm by wp »

stem

  • Jr. Member
  • **
  • Posts: 88
Re: Grid layout with AnchorEditor?
« Reply #2 on: January 02, 2020, 01:07:47 pm »
Thank you for your help!

 

TinyPortal © 2005-2018