Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Multi-Device Apps and Clipboard Support

Author: Marko Von Richards

We have a lot of great demos to help you get started with RAD Studio. Today’s blog post focuses on our CopyPaste FireMonkey demo.

The CopyPaste sample demonstrates how to create applications that use the system’s clipboard to copy and paste text or images. The sample uses IFMXClipboardService to interact with the system clipboard. The SetClipboard method is used to put data into the system clipboard and the GetClipboard method is used to return data from the system clipboard.

Windows, macOS and iOS platforms provide copy/paste of both text and images. The Android clipboard does not support images. To allow users to copy and paste images between your own Android applications, you can use a custom format instead.

The CopyPaste sample leverages FMX.Controls.TControl.MakeScreenshot. MakeScreenshot creates a new TBitmap, draws on it the image of the current control by calling PaintTo, and returns it.

 

[crayon-6768dc5476f6b007262549/]

 

See the demo in action below:

 

 

Exit mobile version