ComponentOne True DBInput Pro 8.0
TDBTime Spin Object Properties

The TDBTime control's Spin object allows you to add a spin-up and a spin-down button to increment and decrement time entry.

The buttons can be added only on the right portion of the control, either inside or outside of the control area by using the Position property.

The properties of the Spin object can be set with the Button Property Page (TDBTime) at design time, and can be set with Visual Basic code at run time.

The following code demonstrates how to change the spin button’s appearance at run time:

Example Title
Copy Code
With TDBTime.Spin

    .Visible = dbiShowOnFocus

    .Position = dbiSpinPosInside

End With

When using this object, the current field of the control which the caret is placed in will increment and decrement. If the caret is placed on a literal, the spin action will be ignored and not have any effect.

You can also increment past the maximum limit time (23:59:59) and start again at the minimum limit time (00:00:00), or vice-versa, by setting the Wrap property. Note that the maximum and the minimum limit time may change according to the settings specified with the ValidateMode property. The amount of the number to spin will be determined by the Increment property.

Performing spin actions will cause values to carry on in any mode of the ValidateMode property. Also the valid ranges for the spin actions are equivalent when entering data defined in the individual modes, and not determined by the MaxTime and the MinTime properties. For the details, please refer to the ValidateMode property.

Up and Down arrow keys can be used together with the Spin object to increment and decrement values, if not assigned to the Key object properties and when the SpinKeys property is set to True. Please refer to the Key:controls object property section for further information.

The SpinUp and SpinDown events will be fired when clicking on the Up/Down arrow spin buttons or when pressing the Up/Down arrow key to increment/decrement the date value.

Note: When the control is set to the free format entry, all spin actions (mouse and keyboard) will be disabled.

Clicking on the spin buttons will cause the focus to move into the edit control.

The Spin Object properties are listed in the following reference section:

Spin Object Properties

 

 


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

Product Support Forum  |  Documentation Feedback