Vcl.StdCtrls.TCustomCombo.SelStart

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property SelStart: Integer read GetSelStart write SetSelStart;

C++

__property int SelStart = {read=GetSelStart, write=SetSelStart, nodefault};

Properties

Type Visibility Source Unit Parent
property public
Vcl.StdCtrls.pas
Vcl.StdCtrls.hpp
Vcl.StdCtrls TCustomCombo

Description

Specifies the position of the first selected character in the edit portion of the combo box.

Read SelStart to determine where the selection starts in the Text property. The first character is designated with 0, the second with 1, and so on. When SelLength is 0, SelStart is the position of the cursor.

Set SelStart to position the cursor in the edit region of the combo box. Setting SelStart to 0 positions the cursor before the first character, setting SelStart to 1 positions the cursor before the second character, and so on.

Note: Setting SelStart changes the SelLength property to 0. When using SelStart and SelLength to programmatically select a portion of the text in the edit region, set SelStart before setting SelLength.

Note: The SelStart property is only valid when the combo box has focus. When the combo box does not have focus, reading SelStart always yields a value of 0, and setting it has no effect.

See Also

Code Examples