Control Alignment issue lazarus / 10-Designer ---------------------------------------------------------------------- snorkel · 2012-10-24 14:36 I might have missed it,but I can't find a way to center controls vertically in a panel or other container. For example say I have a panel aligned bottom to act as a footer to contain two buttons. If I use the alignment options I for the life of me can't get them to center vertically in the panel. If I select Center in Window, it does not check if the controls are in a container and simple centers them in the middle of the form. I am using Laz 1.0.2 Is there a alignment option I am just not seeing? Thanks, Snorkel. ---------------------------------------------------------------------- Dibo · 2012-10-24 14:44 This article about ChildSizing property should be helpful: http://wiki.freepascal.org/Autosize_/_Layout#Layout ---------------------------------------------------------------------- Blaazen · 2012-10-24 14:47 Buttons must be on the panel (i.e. Panel is their parent). Set Panel.ChildSizing: ControlsPerLine=2; LayOut=LeftToRightThenTopToBottom; EnlargeHorizontal=crsHomogenousSpaceResize EnlargeVertical=crsHomogenousSpaceResize Panel itself set in AnchorEditor, it must be anchored [akLeft, akRight, akBottom] to Form. ---------------------------------------------------------------------- snorkel · 2012-10-24 18:47 Hi, Thanks, but that's not what I mean. I mean when I select two controls in a container, and then right click to get the alignment dialog. I can't center both the controls vertically or horizontally in the container, only in the window, and if you do that it moves them out of the visual area of the container. I don't want to compare delphi, but in delphi the alignment menu has "Center Vertically" and "Center Horizontally" and centers them in the parent container. Do you see what I am getting at now? Thanks, Snorkel ---------------------------------------------------------------------- Blaazen · 2012-10-24 19:02 It does not work for me too. I expected the Space Equally will do the job but not. You have to use Anchor dialog instead of Align... dialog. Maybe you can fill feature request on bugtracker if you think Lazarus should have this feature.