Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2020-06

How to stop the ChildSizing?

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Grajcar

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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200612/db009a6d/attachment.html>

Reply by email

Werner Pamler
to Martin Grajcar
Martin Grajcar wrote 11 lines
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.

Reply by email