rvico TRichView Reference | TRichViewEdit

TCustomRichViewEdit.EditorOptions

Top  Previous  Next

Additional options affecting editing

type

  TRVEditorOption = (rvoClearTagOnStyleApp, rvoCtrlJumps,

    rvoDoNotWantReturns, rvoWantTabs,

    rvoAutoSwitchLang, rvoHideReadOnlyCaret, 

    rvoDoNotWantShiftReturns, rvoNoImageResize,

    rvoNoCaretHighlightJumps, rvoNoReadOnlyJumps,

    rvoDragDropPicturesFromLinks)

  TRVEditorOptions = set of TRVEditorOption;

 

property EditorOptions: TRVEditorOptions;

Options for disabling/enabling certain editing operations

Option

Meaning

rvoDoNotWantReturns

If set, editor ignores  Enter  keys.

rvoDoNotWantShiftReturns

If set,  Shift + Enter  does nothing (by default, it inserts a line break inside paragraph – noticeable in paragraphs with bullets or borders)

rvoWantTabs

If set (default), editor accepts  Tab  key ( Ctrl + Tab  always works). Tabs can be inserted as several spaces, or as a tabulator (special item type), depending on the value of SpacesInTab property of the linked TRVStyle component.

rvoNoImageResize

Prevents resizing pictures and controls with mouse.

Visual options

Option

Meaning

rvoNoCaretHighlightJumps

If set, hyperlinks will not be highlighted (with HoverColor and HoverBackColor) when the caret is moved inside them.

rvoHideReadOnlyCaret

If set, the editor hides the caret in read-only mode

Drag&drop options

Option

Meaning

rvoDragDropPicturesFromLinks

If set, when an URL is dropped in the editor, if this is a link to an image, the editor tries to insert it as an image, not as a link.

The most probably, the link points to a remote image, so it needs to be downloaded before insertion. You can do it in OnImportPicture event.

If rvoAssignImageFileNames in Options, the component assigns a "file name" property for this image.

 

Hypertext options

Option

Meaning

rvoCtrlJumps

If set (default), the editor switches to the hypertext mode (highlighting hypertext items under mouse cursor, using hypertext cursors, generating OnJump and OnRVMouseMove) when user presses and holds  Ctrl  key

The editor switches back to the editing mode when user releases  Ctrl  key or changes document, or if the editor loses focus.

rvoNoReadOnlyJumps

If not set (default), the editor automatically switches to the hypertext mode when it becomes read-only.

If set, hyperlinks in a read-only mode work like in a normal mode.

Other options

Option

Meaning

rvoClearTagOnStyleApp

If set, editor clears tags (set to '') of all text items when changing their style index using ApplyTextStyle or ApplyStyleConversion method.

rvoAutoSwitchLang

If set, the editor processes changing of keyboard locale (WM_INPUTLANGCHANGE message) and switches the current text style to the style having charset of the new keyboard locale. This option helps to provide multilingual input without using Unicode.

This option is ignored if the current text style is Unicode style. If not, the editor searches for non-Unicode text styles with Charset of the new keyboard locale, and switches CurTextStyleNo to it. If such style was not found, the editor adds a new style in the collection of text styles.

Thus this option may add new styles in the collection of text styles. If you use this option, you need to store text styles with the document (see "allow adding styles dynamically").

Default value (changed in v1.9):

[rvoWantTabs, rvoCtrlJumps]

See also:

Options.

See also events:

OnJump;

OnRVMouseMove.

See also:

TRVStyle.SpacesInTab;

RichView Hypertext;

Tags.


TRichView © trichview.com