ComponentOne True DBInput Pro 8.0
SelLength Property (TDBText)

 

Reference> TDBText Control> TDBText Control Properties> SelLength Property (TDBText)

SelLength Property (TDBText)

Sets/returns the number of characters selected.

Syntax

control.SelLength= long

Read/Write at run time. Not available at design time.

Remarks

This property can be used for tasks such as setting the insertion point, establishing an insertion range, selecting sub strings in a control, or clearing text. Used in conjunction with the Clipboard object, these properties are useful for copy, cut, and paste operations.

The control allows users to set the SelStart and SelLength properties in the GotFocus event to determine the cursor position and the selection upon receiving the focus, which will override the HighlightText and the CursorPosition property settings.

Setting the SelLength to less than 0 causes a run-time error. Also, changing SelStart and SelText will cause the selection to change to an insertion point and replace the selected text with the new string. This will set the SelLength to 0.

This property will be determined based on characters and not bytes.

If the underlying value or the text of the control is modified, the SelLength property will be automatically reset to 0.

The current text selection will be applied to the drop-down edit window when dropping the window down. If change the selection within the edit window, the new settings will be set back to the control upon closing the window.

See Also

SelText Property (TDBDate)

SelStart Property (TDBDate)

HighlightText Property (TDBDate)

HighlightText Property (TDBNumber)

CursorPosition Property (TDBDate)

CursorPosition Property (TDBMask)

CursorPosition Property (TDBTime)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback