RAD Studio 10.4.1 is now available! Learn more. Looking for discounts? Visit our Special Offers page!

Clone FireMonkey objects

Author: Vsevolod L1433

I’ve got a task of cloning FireMonkey objects. Let it be “chess”. An object is created as an aggregate in design-time. Look at the picture in the Structure pane. I have made the composite pawn model and start thinking of make 15 more.

If you’re thinking of a similar method, please, try Clone method. It will help you clone any FireMonkey object, not necessarily pawns, 3D primitives, but also controls. The only hint you need to know is that the only property “Parent” is not cloned, not to trigger rebuilding of the scene. Very often cloning should be done “purely-in-memory” with no consequences to the visual interface and corresponding times to draw.

The code shows how to do clones:

Once again, Clone is implemented in TFmxObject (FMX.Types).

Thanks to Eugene Kryukov, FireMonkey architect and my good adviser.

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Learn More About Upgrading

Related posts

What's New in the GetIt Package Manager - June 2020


RAD Studio 10.4 Now Available, Learn More

C++NewsRAD Studio

Open for Business with 10.4! - May 2020 GM Update


Embarcadero Open Source Project Sponsorship

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.