[Lazarus] Which method is called at the very end of TWinControl creation?
Krzysztof
dibo20 at wp.pl
Sun Nov 8 18:05:10 CET 2015
Hi,
I have form which has a lot of panels created at runtime. These panels have
controls and splitters (inside). The problem is with setting initial
splitters position when user open form. I want that spliiters should have
center position of its parent (parent = runtime created panel) but it is
tricky because parents of splitters are not fully initialized and have
Width and Height = 0 so I can't calculate splitter position on creation
stage. Whole layout is based on Aligns.
I solved this by overriding AdjustSize/InvalidatePreferredSize method.
There I'm checking if widths and heights are <> 0, if yes then setting up
splitters. It is working fine but I'm wondering if there is more clear
solution. What I'm looking is virtual method like
"ThisIsCalledWhenControlIsCompletelyAdjustedAndReadyWithAllChildrens" .
Tried other methods like VisibleChanged, ChildHandlesCreated etc
but without success
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151108/9d105646/attachment-0002.html>
More information about the Lazarus
mailing list