Selecting Part of RichView Document
|Top Previous Next|
User can select a part RichView document with the mouse (in RichViewEdit he/she also can use Shift +caret movement keys).
You can turn off/on a word selection mode, see RVStyle.SelectionMode.
By default, it is clHighlightText on clHighlight both for active (focused) and inactive windows.
See also RVStyle.SelectionStyle.
▪disallow making selection (clear rvoAllowSelection in Options); please do not use in editor!
▪determine if the selection is not empty (SelectionExists);
▪deselect RichView (Deselect; Invalidate);
▪select the whole document (SelectAll; Invalidate);
▪get selection bounds (GetSelectionBounds);
▪select a part of the document (SetSelectionBounds;Invalidate);
▪select the inserted control (SelectControl);
▪get the selection as a text (GetSelText, GetSelTextW);
▪get the selection as an image, if image is selected (GetSelectedImage);
▪copy the selection to the Clipboard in various formats (see RichView Clipboard Functions Overview)
In editor you can:
▪delete selection (DeleteSelection);
▪cut selection to the Clipboard (CutDef);
Note: All methods introduced in RichView which can change visual appearance require calling Invalidate or Refresh after them.
Note: All methods working with selection must be called only when the document is formatted.
TRichView © trichview.com