[Overview][Types][Classes][Procedures and functions][Index] |
Gets a TComponent instance with the specified owner and parent from the clipboard.
Source position: clipbrd.pp line 200
public function TClipboard.GetComponent( |
Owner: TComponent; |
Parent: TComponent |
):TComponent; |
var RootComponent: TComponent; |
OnFindComponentClass: TFindComponentClassEvent; |
Owner: TComponent = Nil; |
Parent: TComponent = Nil |
); |
Owner |
|
TComponent instance which owns the component on the clipboard. |
Parent |
|
TComponent instance which is the parent for the component on the clipboard. |
TComponent instance created from the clipboard data, or Nil when not found.
Owner |
|
TComponent instance which owns the component on the clipboard. |
Parent |
|
TComponent instance which is the parent for the component on the clipboard. |
GetComponent is an overloaded method in TClipboard used to read a TComponent instance that was previously stored to the clipboard.
GetComponent allocates a temporary TMemoryStream which is used to read the content stored to a pcfComponent clipboard format (when found). The OnFindComponentClass argument is called to retrieve the class type needed to re-create the TComponent instance. The ReadComponentFromBinaryStream routine (in LResources) is called to create the component in the return value using the arguments to the method.
The return value is Nil if there is no component on the clipboard with the Owner and Parent specified in the arguments to the method.
|
Version 4.0 | Generated 2025-05-03 | Home |