I'm doing some components and I want to do them compatibles for VCL and FMX. So I have a structure that follows this pattern:
General_dpk (with TCustomMyClass) + VCL_dpk (with TMyClass) + FMX_dpk (with TMyClassFMX)
Each package have their register procedure that registered their components. In the components palette appears both components (VCL and FMX). How to do that only appears the components according the type of project selected (VCL or FMX) like the others Delphi components?
Thanks
Well, after a long search I have asked in the Embarcadero forum. There, Remy said me the answer kindly (easy when you know it). The thing is that you need to call GroupDescendentsWith function into the register procedure like this
// para componentes VCL
GroupDescendentsWith(TMyClass, Vcl.Controls.TControl);
// para componentes FMX
GroupDescendentsWith(TMyClassFMX, Fmx.Types.TControl);
The answer on Embarcadero forum here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With