Hi all,
I'm finishing porting a component library from Delphi to Lazarus and I'm hitting a wall and I think I'm missing something... I hope someone can point me to the right direction.
In my Delphi codebase i have a TScrollingWinControl descendant that, at design time, should behave as a TFrame (i.e. it would be able to receive visual controls). I can't descend it from TFrame/TCustomFrame though (and this can't be changed).
When converting the code base to Lazarus/FPC I used TCustomDesignControl instead of TScrollingWinControl (exactly the same as a TCustomFrame does). At runtime everything works as it should and I don't see any issues. So far so good.
However, at design time it doesn't behave as expected. I can drop visual controls onto this new TFrame-like container, but the controls don't paint themselves and can't be moved around (I can only resize them). I would expect my TCustomDesignControl to behave at design time similarly to a TFrame (regarding parented/owned visual controls), but it doesn't.
I read all TCustomFrame related code and I also implemented things that could possibly be required:
I implemented an overriden class procedure WSRegisterClass, and from it I'm calling the RegisterCustomFrame proc. I also implemented the GetChildren(), identical to the TCustomFrame implmentation. Still, nothing changed.
So, my question is: how to add the missing design time support to my TCustomDesignControl without changing the ancestor to a TCustomFrame/TCustomForm?
Thanks in advance