Quick Find: Search for:

 Total Access Components
Control Tour

Return to Components Home
 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

About Box

AVI (Video)

Bitmap Effects

Border
Browse for Folder New!
CD Player
Clipboard
Clock
Common Dialogs
Date Time Picker New!
Digital Display
Enhanced Button
Gauge
Icon Menu
INI File
Marquee
Notes
Popup Menu
Progress Meter
Registry
Resize
Slider
Spin Button
Splitter
System Info
Tab Strip
Text Effects
Timer
Wave
 

 

Total Access Components Tour: Slider

The Slider control is a databound control that is used to adjust a numeric value by dragging or sliding the control’s tab or handle. It is commonly used in Windows Applications to adjust a continuous numeric value smoothly. The Slider control can be associated with another control to adjust that control’s value, or it can be used by itself as a vehicle for input.

Using the Slider control

There are three basic steps for using the Slider control:

Step 1: Associate the Slider control with another control

If you want the slider to adjust the value in another control, determine which control on the form to use. Otherwise, the slider can be used by itself to update a field or a value used in a subroutine.

Step 2: Modify the Slider control’s properties

Open the Slider control’s property sheet by right-clicking on the control, selecting FMS Slider Control 2002 Object, and choosing Properties. The Min and Max properties should always be set to the lower and upper limits of the input required. The control’s Value property is used to set its initial value. The LargeChange and SmallChange properties can be used to increment a value by the amount entered in either property as the Slider control is adjusted.

Step 3: Write code for changes to the Slider control’s value

In the Slider control’s OnChange event, write code to apply the user's changes. This can change the associated text box or other control’s value by applying the Slider control’s Value property, or by adding/subtracting the Slider control’s LargeChange or SmallChange values to the value in the associated control.

Slider Properties

Name

Description

BackColor

The color of the control’s background.

Direction

The direction from which the slider increases.

Enabled

Whether the user can manipulate the control.

LargeChange

The value to change the slider by when a large change event occurs.

Max

The maximum value (an integer).

Min

The minimum value (an integer).

Orientation

The control’s orientation.

SmallChange

The value to change the slider by when a small change event occurs.

TickFrequency

The frequency of the tick marks.

TickStyle

The location of the tick marks.

Value 

The value of the control.

Slider Events

Name

Description

Click

Fires when the mouse is clicked over the control.

DblClick

Fires when the mouse is double clicked over the control.

KeyDown

Fires when a key is depressed.

KeyPress

Fires when a key is pressed.

KeyUp

Fires when a key is released.

MouseDown

Fires when a mouse button is depressed over a control.

MouseMove

Fires when the mouse moves over the control.

MouseUp

Fires when a mouse button is released over a control.

OnChange

Fires when the user changes the value of the control.

Questions  l   Web questions: Webmaster   l   Copyright © 2008 FMS, Inc.

Celebrating 21 Years of Software Excellence