TClipboard.GetComponentAsText procedure
Loads a component instance from a textual representation stored in the clipboard.
Declaration
procedure GetComponentAsText(var RootComponent: TComponent;
OnFindComponentClass: TFindComponentClassEvent;
Owner: TComponent=Nil;
Parent: TComponent=Nil)Arguments
RootComponent | Variable argument where the component loaded from the clipboard is stored. |
OnFindComponentClass | Routine used to the locate the component class reference need to create a new component instance. |
Owner | Owner of the newly created component instance. |
Parent | Parent for the newly created component instance. |
Description
GetComponentAsText creates a temporary TMemoryStream used to load
the pcfText clipboard content returned by AsText. ReadComponentFromTextStream
(in
lresources.pp) is called to get the component class reference
needed to instantiate and load the component in RootComponent.
Owner
and
Parent contain the values stored to the corresponding properties
in the newly created component instance.
Use GetComponent to create and load a component instance from a pcfComponent format stored in the clipboard.
Use SetComponentAsText and SetComponent to store a component instance to the clipboard using with the pcfText or pcfComponent format.
Use SupportedFormats to determine which storage formats are supported in the clipboard.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
