ComponentOne True DBInput Pro 8.0
CursorPosition Property (TDBTime)

 

Reference> TDBTime Control> TDBTime Control Properties> CursorPosition Property (TDBTime)

CursorPosition Property (TDBTime)

Sets/returns the cursor position (field) upon receiving focus.

Syntax

TDBTime.CursorPosition= value

Read/Write at run time and design time.

Values

Design Time

Run Time

0 - (Default)

dbiCurPosDefault

1 - AMPM

dbiCurPosAMPM

2 - Hour

dbiCurPosHour

3 - Minute

dbiCurPosMinute

4 - Second

dbiCurPosSecond

Remarks

You can use this property to determine which field to locate the cursor on when receiving focus. You can also use the HighlightText property in combination to determine whether to select the field you locate on.

If CursorPosition is set to 0-Default and HighlightText is set to 0-None, the cursor will be positioned according to the settings of the SelStart and SelLength properties. Note that as soon as the user clicks on the control, the SelStart and the SelLength settings are changed to the position clicked on.

If CursorPosition is set to 0-Default and HighlightText is set to 1-Field, a non-literal field determined by the SelStart property setting will be selected. However, if the SelStart position happens to be located on a literal, the next non-literal field will be selected. If the next non-literal field does not exist, then the previous field will be selected. Note that as soon as the user clicks on the control, the SelStart setting is changed to the position clicked on.

If CursorPosition is set to one of the non-zero field constants and HighlightText is set to 0-None, the cursor will be positioned at the first character of the specified field.

If CursorPosition is set to one of the non-zero field constants and HighlightText is set to 1-Field, the specified field will be selected and the cursor will be positioned at the far right.

If the HighlightText property is set to 2-All, the entire contents of the control will be selected, the cursor will be positioned at the far right, and the CursorPosition setting will be ignored.

If CursorPosition is set to a field which is not included in the input mask, the cursor will be placed at the leftmost non-literal field.

When the control is set for free format entry, the entered text and the Null/Era expression may cause the control be unable to determine the correct position for locating the cursor when receiving focus. Therefore, in these cases, all text will be treated as one field and the cursor will be placed on the left most position.

By default, the cursor will be placed on the first character of the first non-literal field.

See Also

HighlightText Property (TDBTime)

SelStart Property (TDBTime)

SelLength Property (TDBTime)

Format Property (TDBTime)

 

 


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

Product Support Forum  |  Documentation Feedback