PDA

View Full Version : Size and Position



Xarxus
October 12th, 2023, 09:50
Is there an event that I can use to know when a control has finished drawing itself?
Using createControl the setPosition and setSize functions return 0, even after setAnchor, setAnchoredHeight, and setAnchoredWidth

Moon Wizard
October 12th, 2023, 16:10
You can use onFirstLayout to get an event after the first layout of the parent window. Anything else I've played with generates too many recursive issues, so that's the solution. I design to avoid that issue in 99% of the cases, and use the onFirstLayout event if absolutely needed.

Regards,
JPG