RAD Studio
ContentsIndex
PreviousUpNext
Adding the Clipboard Object

Most text-handling applications provide users with a way to move selected text between documents, including documents in different applications. TClipboard object encapsulates a clipboard (such as the Windows Clipboard) and includes methods for cutting, copying, and pasting text (and other formats, including graphics). The Clipboard object is declared in the Clipbrd unit.

To add the Clipboard object to an application:

  1. Select the unit that will use the clipboard.
  2. Search for the implementation reserved word.
  3. Add Clipbrd to the uses clause below implementation.
    • If there is already a uses clause in the implementation part, add Clipbrd to the end of it.
    • If there is not already a uses clause, add one that says

    uses Clipbrd;

 

#include <vcl\Clipbrd.hpp>

For example, in an application with a child window, the uses clause in the unit's implementation part might look like this:

uses
  MDIFrame, Clipbrd;
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!