Links
EControl Syntax Editor SDK
TCustomSyntaxMemo.SelectMode Property

Represents current selection mode of the syntax memo.

property SelectMode: TSyntSelectionMode;

SelectMode specifies how user performs text selection (marks selection block). Selected block may be then copied to clipboard, moved, deleted, overwritten. 

 

Available selection modes:

Mode 
Meaning 
msNone 
No selection is available. It is default. 
msNormal 
Normal selection that is selection from start position SelStart with the length SelLength
msColumn 
Column selection. Selected block is available through SelRect property. 
msLine 
Line selection. This mode is like normal selection except SelStart and SelLength are determined to select whole lines. 

 

When user moves caret without pressed control keys, SelectMode is reseted to msNone. If Options contains soKeepSelMode, SelectMode is not reseted to msNone when user moves caret using keyboard. 

If Options contains soGreedySelect selection will contain extra column/line in column/line selection modes. 

 

To perform text selection using mouse:

Pressed control keys 
Mouse down action 
None 
Moves caret to the mouse position and sets SelectMode to msNone. 
Shift 
Moves caret to the mouse position and starts normal selection. 
Shift + Alt 
Moves caret to the mouse position and starts column selection. 
Shift + Alt + Ctrl 
Moves caret to the mouse position and starts line selection. 
Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!