Vcl.StdCtrls.TCustomComboBox.SelText

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property SelText: string read GetSelText write SetSelText;

C++

__property System::UnicodeString SelText = {read=GetSelText, write=SetSelText};

Properties

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

Description

Represents the selected text in the edit region.

Read SelText to obtain the text that is selected in the edit region of the combo box. When the combo box is the active control, SelText appears highlighted. Set SelText to replace the current selection with a different substring. If no text is selected when a value is assigned to SelText, the SelText string is inserted in the text at the cursor.

Note: The SelText property is only valid when the combo box has focus. When the combo box does not have focus, reading SelText always yields an empty string and setting it inserts the text at the cursor rather than replacing the selected text.

See Also