On 29/11/2021 21:20, Ondrej Pokorny via lazarus wrote:
Check TCustomLabel.CalculateSize in lcl\include\customlabel.inc for
the solution how to solve this problem correctly in the component's
code without any modifications needed in T(Custom)Form or T(Custom)Frame.
There, the GetDC(0) is used for Canvas.Handle, so that the label's
parent's handle doesn't need to be created.
That raises another question: Why does it need that before/unless it is
visible?
Does autosize run, for non-visible components?
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus