On 29.11.2021 11:32, Martin Frb via lazarus wrote:
On 29/11/2021 10:52, Juha Manninen via lazarus wrote:
Please everybody test issue:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/25124
Some components caused an error when placed on a Frame. Now it
apparently works.
Can somebody please explain why it works. (See my comment there).
So maybe your patch should be extended, to only do that, if the
control is in "designtime" state?
Yes, definitely add a condition to check the designtime state.
There are many scenarios when the Canvas cannot be accessed and it is a
common mistake to access it when not allowed.
I didn't study the issue further but to me it looks strange that setting
some parameters in CreateParams helps with it. Juha, your commit
description "Somehow fixes issue ..." doesn't help to understand your
change either.
So I would encourage the component author to rewrite his code.
Ondrej
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus