ComponentOne True DBInput Pro 8.0
CursorPosition Property (TDBDate)

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

Syntax

TDBDate.CursorPosition= value

Read/Write at run time and design time.

Values

Design Time

Run Time

0 - (Default)

dbiCurPosDefault

1 - Era

dbiCurPosEra

2 - Year/Era Year

dbiCurPosYear

3 - Month

dbiCurPosMonth

4 - Day

dbiCurPosDay

Remarks

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

If the CursorPosition property is set to 0-Default and the HighlightText property is set to 1-Field, a non-literal field determined by the SelStart property setting will be selected. However, if the SelStart position locates 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 you click on the control, the SelStart setting is changed to the position clicked on.

If the HighlightText property is set to 2 - All, the entire contents of the control will be selected, and the CursorPosition settings will be ignored.

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

When setting the control for free-format entry, the enter text, Null and Era expressions may cause the control to 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 (TDBDate)

SelStart Property (TDBDate)

SelLength Property (TDBDate)

Format Property (TDBDate)

 

 


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

Product Support Forum  |  Documentation Feedback