SelText: String;
SelText: string;
The SelText property defines text selected in the component.
On getting the SelText property value, the text selected in the component will be returned.
On setting the SelText property value, it behavior depends on the fact if there is selected text in the component:
Any text is selected in the component. The selected text will be replaced with the value installed 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: