|
RichView Clipboard Functions Overview |
Top Previous Next |
|
TCustomRichView and its descendants can copy information to the Clipboard as plain (ANSI and Unicode) text, image, RTF and RVF, and your own custom formats. RichViewEdit can paste information from the Clipboard as text (ANSI and Unicode), image, RTF, and RVF (and your own formats). Copying The main method for copying to the Clipboard is CopyDef. It can copy selection in one or more formats. This method copies data in formats specified in RichView.Options:
CopyDef is called automatically when user presses Ctrl + Insert or Ctrl + C . You can also use methods for copying:
SelectionExists method answers to the question "does the selection contain some data (not empty)?" OnCopy event allows copying in your own formats. Pasting TRichView cannot paste. All these methods are methods of TRichViewEdit. Pasting:
Testing is the Clipboard has the specific format:
OnPaste event allows to override the default pasting procedure. For example, you can paste data in different format, or you can allow pasting only some specific formats (for example, only a plain text). Cutting RichViewEdit.CutDef copies the selection (like CopyDef) and then deletes it (like DeleteSelection). This method is called automatically when user presses Ctrl + X or Shift + Delete . Windows messages RichView processes WM_COPY message, RichViewEdit also processes WM_PASTE and WM_CUT. See also... |