RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomMaskEdit.SetSel Method

Selects character range.

Pascal
procedure SetSel(SelStart: Integer; SelStop: Integer);
C++
__fastcall SetSel(int SelStart, int SelStop);

SetSel selects the indicated range of characters in the EditText, regardless of whether any of them are editable. If SelStart is the same as SelStop, SetSel positions the cursor at the SelStart character. When using SetSel, leave the cursor in an editable position if the intent is to create a selection for the user to replace. 

SetSel can be used to select non-editable characters that can then be captured by using the SelText property or by copying to the Clipboard. Once the selection has been captured, return the cursor to an editable position by calling CheckCursor

 

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