Vcl.Mask.TCustomMaskEdit.SetSel

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SetSel(SelStart: Integer; SelStop: Integer);

C++

void __fastcall SetSel(int SelStart, int SelStop);

Properties

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

Description

Selects character range.

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.

See Also