Contents

  The ctSpin object is a two button spinner control

This object can be used to help increment or decrement the values within another control. When a button on the control is clicked on, an event will fire that will allow the programmer to change a value. That event will continue to fire if the user continues to press on one of the buttons.

File Names

16 bit	CTSPIN16.OCX

32 bit	CTSPIN32.OCX

Class Name

ctSpin

See Also :

Events

Properties

   ctSpin © 1996 Gamesman Inc.. The ctSpin OCX is part of the Component Toolbox OCX


Properties

ctSpin Property	Data Type	Description
ArrowColor	long	Specifies the color used to paint the arrows on the buttons.
ArrowSize	integer ( enumerated )	Specifies the size of the arrows drawn in the buttons. Valid values include ... •    0 - Small •    1 - Large
BackColor	long	Specifies the background color of the control.
BevelSize	integer	Specifies the size or thickness of the bevel around the buttons.
BorderColor	long	Specifies the border color of the control.
DisableColor	long	Specifies the color used to paint the arrows on the buttons when the control is disabled.
InitialDelay	integer	Specifies the initial delay before the control starts to repeatedly fire a Click event when a button is held down.
RepeatRate	integer	Specifies the amount of time before each Click event if fired when a button is held down.
SpinStyle	integer ( enumerated )	Specifies the orientation of the spin buttons. Valid values include ... •    0 - Vertical •    1 - Horizontal


ArrowColor
ArrowColor Property

Description

Specifies the color of the arrows on the spin buttons when the control is enabled.

Syntax

[form.]ctSpin.ArrowColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctSpin.ArrowColor = RGB( 255, 0, 0 )


ArrowSize
ArrowSize Property

Description

Specifies the size of the arrows drawn in the buttons. Valid values include ...

•    0 - Small

•    1 - Large

Syntax

[form.]ctSpin.ArrowSize [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctSpin.ArrowSize = 0


BackColor
BackColor Property

Description

Specifies the background color of the control.

Syntax

[form.]ctSpin.BackColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctSpin.BackColor = RGB( 128, 128, 128 )


BevelSize
BevelSize Property

Description

Specifies the size or thickness of the bevel around the buttons.

Syntax

[form.]ctSpin.BevelSize [ = setting% ]

Data Type

Integer

Example

ctSpin.BevelSize = 2


BorderColor
BorderColor Property

Description

Specifies the color of the border painted around the control.

Syntax

[form.]ctSpin.BorderColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctSpin.BorderColor = RGB( 128, 128, 128 )


DisableColor
DisableColor Property

Description

Specifies the color used to paint the arrows on the buttons when the control is disabled.

Syntax

[form.]ctSpin.DisableColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctSpin.DisableColor = RGB( 128, 128, 128 )


InitialDelay
InitialDelay Property

Description

Specifies the initial delay before the control starts to repeatedly fire a Click event when a button is held down. This value is in milliseconds.

Syntax

[form.]ctSpin.InitialDelay [ = setting% ]

Data Type

Integer

Example

ctSpin.InitialDelay = 5


RepeatRate
RepeatRate Property

Description

Specifies the amount of time before each Click event if fired when a button is held down. This value is in milliseconds.

Syntax

[form.]ctSpin.RepeatRate [ = setting% ]

Data Type

Integer

Example

ctSpin.RepeatRate = 50


SpinStyle
SpinStyle Property

Description

Specifies the orientation of the spin buttons. Valid values include ...

•    0 - Vertical

•    1 - Horizontal

Syntax

[form.]ctSpin.SpinStyle [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctSpin.SpinStyle = 1


Events

ctSpin Event	Occurs
Click	Occurs when either one of the buttons in the control is clicked on.
DblClick	Standard Event
MouseDown	Standard Event
MouseMove	Standard Event
MouseUp	Standard Event


Click
Click Event

Description

Occurs when either one of the buttons in the control is clicked on.

Parameters

This event has one parameter sent to it....

•    1 - nButton	( integer )	The button being pressed

Note

The nButton parameter is used to determine which of the two buttons is being pressed. If it contains a value of 0, the top or left button is being clicked on. If it contains a value of 1, then the bottom or right button is being clicked on.