SelText: String;
SelText: string;
The SelText property determines the text selected in the component.
When the SelText property value is obtained, the text selected in the component will be returned.
When the SelText property value is set, its behavior depends on the fact if there is selected text in the component:
A text is selected in the component. The selected text will be replaced with the value set in SelText.
There is no selected text in the component. The value set in SelText will be added to the position where the cursor is placed (SelStart).
After the SelText value is set, the component is deselected. The SelText property returns empty value, the SelLength will be zero and the SelStart property value will be changed taking into account the text length that was set as the SelText value.
The property use is given in the example for ICustomEdit.SelLength.
See also: