Contents

 The ctSlide object is a slider control.

The slider is divided into two parts. The slider bar is the background image for the control. The thumb is the object that can be moved within the slider bar. The slider can be moved by clicking and dragging its thumb with the mouse, by using the arrow keys on the keyboard, or by changing the controls Value property.

The slider can be oriented in either a vertical or horizontal manner. Its range is defined by the user. The thumb moves across the slider based upon the defined range. (i.e. if the range is set from 0 - 100, there will be 100 different positions that the thumb can be positioned upon) Stock images are provided for the slider background and thumb. However, the programmer can replace either one with their own bitmap image.

The control is divided into both an inner and outer area. Each area has its own independent border type and color. The inner area is used to display the actual slider data such as the background picture or ruler data. The inner area can complete override the outer are by setting the InnerBottom, InnerLeft, InnerRight, and InnerTop properties to 0.

File Names

16 bit	CTSLID16.OCX

32 bit	CTSLID32.OCX

Class Name

ctSlide

See Also :

Events

Properties

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


Events

ctSlide Event	Occurs
Click	Standard Event
DblClick	Standard Event
MouseDown	Standard Event
MouseMove	Standard Event
MouseUp	Standard Event
SlideChange	Occurs when the thumb is moved and the Value property is changed.
ThumbClick	Occurs when the mouse is clicked on the thumb.


Properties

ctSlide Property	Data Type	Description
BackColor	long	Specifies the background color of the outer area of the control.
BarColor	long	Specifies the color used to paint the slider bar in the inner area of the control.
BorderColor	long	Specifies the border color of the control.
Font	Font	Specifies the font used for all text within the control.
ForeColor	long	Specifies the color used to paint the text of the days of the month.
InnerBorder	integer (enumerated)	Specifies the type of border to place around the inner area of the slider control. Valid values include ... •   0 - Regular •   1 - None •   2 - Raised •   3 - Lowered
InnerBottom	integer	Specifies the distance between the bottom of the inner and outer border areas.
InnerColor	long	Specifies the color used to paint the inner slider area.
InnerLeft	integer	Specifies the distance between the left side of the inner and outer border areas.
InnerRight	integer	Specifies the distance between the right side of the inner and outer border areas.
InnerTop	integer	Specifies the distance between the top of the inner and outer border areas.
KeyMove	integer	Specifies the change in Value property when the arrow keys are pressed.
MaxValue	integer	Specifies the maximum value of the slider.
MinValue	integer	Specifies the minimum value of the slider.
OuterBorder	integer (enumerated)	Specifies the type of border to place around the outer area of the slider control. Valid values include ... •   0 - Regular •   1 - None •   2 - Raised •   3 - Lowered
PageMove	integer	Specifies the change in Value property when the Page Up or Page Down key is pressed.
PictureBack	Picture	Specifies the new image used in the inner area of the slider.
PictureThumb	Picture	Specifies the new image used to replace the stock thumb.
ShowDivisions	integer	Specifies the amount of divisions to place between each shown value in a marked or ruler type slider.
ShowIncrement	integer	Specifies at which point along the sliders major divisions that a numeral will be displayed.
ShowMax	integer	Specifies the maximum value used to display a numeral within the slider.
ShowMin	integer	Specifies the minimum value used to display a numeral within the slider.
ShowMultiply	integer	Specifies the value used to multiply the displayed numerals on the slider.
SliderOffset	integer	Specifies the value to offset the thumb from each side of the inner border.
SliderStyle	integer ( enumerated )	Specifies the orientation of the control. Valid values include ... •   0 - Horizontal •   1 - Vertical
SliderType	integer ( enumerated )	Specifies the type of background that will be used in the inner slider area. Valid values include ... •   0 - Marked •   1 - Ruler •   2 - User Defined
ThumbHorz	integer	Specifies the offset value of the calculated horizontal position of the thumb.
ThumbStyle	integer ( enumerated )	Specifies the type of thumb to use in the slider. Valid values include ... •   0 - Regular •   1 - Pointer #1 •   2 - Pointer #2 •   3 - User Defined
ThumbVert	integer	Specifies the offset value of the calculated vertical position of the thumb.
Value	integer	Specifies the current value of the control, and the current position of the thumb within the slider.


BackColor
BackColor Property

Description

Specifies the background color of the outer area of the control.

Syntax

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

Data Type

Long ( OLE_COLOR )

Example

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


BarColor
BarColor Property

Description

Specifies the color used to paint the interior of the slider bar in the inner area of the control. This property will have no effect unless the SliderType property is set to 0.

Syntax

[form.]ctSlide.BarColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctSlide.BarColor = RGB( 128, 128, 128 )


BorderColor
BorderColor Property

Description

Specifies the border color of the control.

Syntax

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

Data Type

Long ( OLE_COLOR )

Example

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


Font
Font Property

Specifies the font used for all text within the control. The property will have no effect unless the SliderType property is set to 1.

In order to set the font of the control, it must be either set using the font property page of the control, the property table of the host language ( if available ), or by assigning a font from another control with the same font type to this one.

Syntax

[form.]ctSlide.Font [ = Font ]

Data Type

Font

Example

ctSlide.Font = lbl_Text.Font


ForeColor
ForeColor Property

Description

Specifies the color used to paint the text within the control.

Syntax

[form.]ctSlide.ForeColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctSlide.ForeColor = RGB( 128, 128, 128 )


InnerBorder
InnerBorder Property

Description

Specifies the type of border to place around the inner area of the slider control. Valid values include ...

•    0 - Regular	: Regular border

•    1 - None	: No border

•    2 - Raised	: Raised 3D border

•    3 - Lowered	: Lowered 3D border

Syntax

[form.]ctSlide.InnerBorder [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctSlide.InnerBorder = 2


InnerColor
InnerColor Property

Description

Specifies the color used to paint the inner slider area.

Syntax

[form.]ctSlide.InnerColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctSlide.InnerColor = RGB( 128, 128, 128 )


InnerBottom
InnerBottom Property

Description

Specifies the distance between the bottom of the inner and outer border areas.

Syntax

[form.]ctSlide.InnerBottom [ = setting% ]

Data Type

Integer

Example

ctSlide.InnerBottom = 10


InnerLeft
InnerLeft Property

Description

Specifies the distance between the left side of the inner and outer border areas.

Syntax

[form.]ctSlide.InnerLeft [ = setting% ]

Data Type

Integer

Example

ctSlide.InnerLeft = 10


InnerRight
InnerRight Property

Description

Specifies the distance between the right side of the inner and outer border areas.

Syntax

[form.]ctSlide.InnerRight [ = setting% ]

Data Type

Integer

Example

ctSlide.InnerRight = 10


InnerTop
InnerTop Property

Description

Specifies the distance between the top of the inner and outer border areas.

Syntax

[form.]ctSlide.InnerTop [ = setting% ]

Data Type

Integer

Example

ctSlide.InnerTop = 10


KeyMove
KeyMove Property

Description

Specifies the change in Value property when the arrow keys are pressed.

Syntax

[form.]ctSlide.KeyMove [ = setting% ]

Data Type

Integer

Example

ctSlide.KeyMove = 1


MaxValue
MaxValue Property

Description

The maximum value of the slider.

Syntax

[form.]ctSlide.MaxValue [ = setting% ]

Data Type

Integer

Example

ctSlide.MaxValue = 100


MinValue
MinValue Property

Description

The minimum value of the slider.

Syntax

[form.]ctSlide.MinValue [ = setting% ]

Data Type

Integer

Example

ctSlide.MinValue = 0


OuterBorder
OuterBorder Property

Description

Specifies the type of border to place around the outer area of the slider control. Valid values include ...

•    0 - Regular	: Regular border

•    1 - None	: No border

•    2 - Raised	: Raised 3D border

•    3 - Lowered	: Lowered 3D border

Syntax

[form.]ctSlide.OuterBorder [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctSlide.OuterBorder = 2


PageMove
PageMove Property

Description

Specifies the change in Value property when the Page Up and Page Down keys are pressed.

Syntax

[form.]ctSlide.PageMove [ = setting% ]

Data Type

Integer

Example

ctSlide.PageMove = 1


PictureBack
PictureBack Property

Description

The bitmap or icon image used for the inner area of the control. This image will only be used if the SliderType property is set to 2 ( user defined ).

In order to set the picture of the control, it must be either set using the picture property page of the control, the property table of the host language ( if available ), or by assigning a picture from another control to this one.

Syntax

[form.]ctSlide.PictureBack [ = Picture ]

Data Type

Picture

Example

ctSlide.PictureBack = OLE_Object.Picture


PictureThumb
PictureThumb Property

Description

The new image used to replace the stock thumb. This image will only be used if the ThumbStyle property is set to 3 ( user defined ).

In order to set the picture of the control, it must be either set using the picture property page of the control, the property table of the host language ( if available ), or by assigning a picture from another control to this one.

Syntax

[form.]ctSlide.PictureThumb [ = Picture ]

Data Type

Picture

Example

ctSlide.PictureThumb = OLE_Object.Picture


ShowDivisions
ShowDivisions Property

Description

Specifies the amount of divisions to place between each shown value in a marked or ruler type slider. Therefor, this property will have no effect unless the SliderType property is set to 0 ( marked ) or 1 ( ruler ).

The above slider has set the ShowDivisions attribute to 4. There will be four divisions between each major value in the slider. The ShowMin value is set to 0 and the ShowMax value is set to 5.

Syntax

[form.]ctSlide.ShowDivisions [ = setting% ]

Data Type

Integer

Example

ctSlide.ShowDivisions = 4


ShowIncrement
ShowIncrement Property

Description

Specifies at which point along the sliders major divisions that a numeral will be displayed. This property will have no effect unless the SliderType property is set to 1 ( ruler ).

The above slider has set its ShowIncrement property to 2. Therefor, a numeral will be displayed at every second major division.

Syntax

[form.]ctSlide.ShowIncrement [ = setting% ]

Data Type

Integer

Example

ctSlide.ShowIncrement = 4


ShowMax
ShowMax Property

Description

Specifies the maximum value used to display a numeral within the slider.

Syntax

[form.]ctSlide.ShowMax [ = setting% ]

Data Type

Integer

Example

ctSlide.ShowMax = 10


ShowMin
ShowMin Property

Description

Specifies the minimum value used to display a numeral within the slider.

Syntax

[form.]ctSlide.ShowMin [ = setting% ]

Data Type

Integer

Example

ctSlide.ShowMin = 10


ShowMultiply
ShowMultiply Property

Description

Specifies the value used to multiply the displayed numerals on the slider. This property will have no effect unless the SliderType property is set to 1 ( ruler ).

The above slider ShowMin attribute set to 0 and its ShowMax attribute set to 5. The ShowMultiply attribute is set to 12.

Syntax

[form.]ctSlide.ShowMultiply [ = setting% ]

Data Type

Integer

Example

ctSlide.ShowMultiply = 12


SliderOffset
SliderOffset Property

Description

Specifies the value to offset the thumb from each side of the inner border. It can be set to a new value so that the thumb does not move onto the outer border region of the slider.

Syntax

[form.]ctSlide.SliderOffset [ = setting% ]

Data Type

Integer

Example

ctSlide.SliderOffset = 10


SliderStyle
SliderStyle Property

Description

Specifies the orientation of the control. Valid values include ...

•   0 - Horizontal

•   1 - Vertical

Syntax

[form.]ctSlide.SliderStyle [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctSlide.SliderStyle = 1


SliderType
SliderType Property

Description

Specifies the type of background that will be used in the inner slider area. Valid values include ...

•   0 - Marked	: A series of marks with a slide bar down the center.

•   1 - Ruler	: A ruler type background.

•   2 - User Defined	: A user defined bitmap image. The SliderType property must be set to this setting before the PictureBack image is displayed, even if the PictureBack image is loaded.

Syntax

[form.]ctSlide.SliderType [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctSlide.SliderType = 1


ThumbHorz
ThumbHorz Property

Description

Specifies the offset value of the calculated horizontal position of the thumb.

Syntax

[form.]ctSlide.ThumbHorz [ = setting% ]

Data Type

Integer

Example

ctSlide.ThumbHorz = 10


ThumbStyle
ThumbStyle Property

Description

Specifies the type of background that will be used in the inner slider area. Valid values include ...

•   0 - Regular	: A rectangular thumb

•   1 - Pointer #1	: An up/right pointed thumb

•   2 - Pointer #2	: A down/left pointed thumb

•   3 - User Defined	: A user defined bitmap image. The SliderType property must be set to this setting before the PictureThumb image is displayed, even if the PictureThumb image is loaded.

Syntax

[form.]ctSlide.ThumbStyle [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctSlide.ThumbStyle = 1


ThumbVert
ThumbVert Property

Description

Specifies the offset value of the calculated vertical position of the thumb.

Syntax

[form.]ctSlide.ThumbVert [ = setting% ]

Data Type

Integer

Example

ctSlide.ThumbVert = 10


Value
Value Property

Description

Specifies the current value of the control, and the current position of the thumb along the slider.

Syntax

[form.]ctSlide.Value [ = setting% ]

Data Type

Integer

Example

ctSlide.Value = 50


SlideChange
SlideChange Event

Description

Occurs when the thumb is moved and the Value property is changed.

Parameters

* None


ThumbClick
ThumbClick Event

Description

Occurs when the mouse is clicked on the thumb.

Parameters

* None