RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomMaskEdit.GetSel Method

Returns the endpoints of the current selection in the EditText.

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

Use GetSel to obtain the indexes of the first and last selected characters of the EditText, where 0 is the index of the first character. Not all the characters in the selection will necessarily be editable, if the mask contains literal characters. Do not use the resulting indexes on the Text property if there is a mask, because the EditText may contain blanks or nonliteral characters not found in the Text

To programmatically change the selected text, use GetNextEditChar to cycle through the editable characters of the selection from SelStart to SelStop. 

 

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