Vcl.Mask.TCustomMaskEdit.GetSel

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure GetSel(var SelStart: Integer; var SelStop: Integer);

C++

void __fastcall GetSel(int &SelStart, int &SelStop);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.Mask.pas
Vcl.Mask.hpp
Vcl.Mask TCustomMaskEdit

Description

Returns the endpoints of the current selection in the EditText.

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.

See Also