[Lazarus] How to stop the ChildSizing?

Werner Pamler werner.pamler at freenet.de
Fri Jun 12 10:41:07 CEST 2020


Am 12.06.2020 um 00:36 schrieb Martin Grajcar via lazarus:
> There's a TPage containing a few components I want to position and 
> size manually (sort of position: 'absolute' in CSS). It works well, 
> but then the LCL comes and overrides my work....
>
> I've played with Anchors, AutoSize and Align of both the parent 
> (TPage) and child components for quite a while, but nothing helped. I 
> finally sort of solved it by overriding SetBound in the children, so 
> that only my own calls get honoured.
>
> It works, but it isn't possible with standard components, so I'm 
> looking for something better. Any idea?
I don't know what you were doing, but normally the components do not 
move and resize, they remain at their position relative to the top and 
left edges of their parent. If - as the title of your message suggests - 
you misconfigured ChildSizing you should set ChildSizing.Layout to 
cclNone (for the Parent), and all controls should be movable again.


More information about the lazarus mailing list