Rx Slider

RX Library

Control Name Unit Class
Slider RxSlider TRxSlider

Description:
This is a slider component that emulates the Win32 slider and optionally-ticked bar control that contains a slider which marks a current Value.

Move the slider's thumb* to the desired value on the bar by dragging it with the mouse or by clicking the mouse on the bar.

(* the "
v" thing on the RxSlider --> |----|----|-v---|---|)

To use the keyboard to move the slider, press the arrow keys or the PgUp and PgDn keys.

The MaxValue property sets the maximum position of a TRxSlider. The MinValue property sets the minimum position of a TRxSlider. You can customize the TRxSlider component by using the Orientation property and ImageHThumb, ImageHRuler, ImageVThumb, ImageVRuler properties.


Property EdgeSize
Declaration: EdgeSize: Integer;

"Edge Size".

It is the size of the outer edge of the slider control.


Property ImageHRuler
Declaration: ImageHRuler: TBitmap;

This is the the bitmap for the horizontal ruler.
In other words, it's the "
---" thing on the slider --> |----|----|-v---|---|)


Property ImageHThumb
Declaration: ImageHThumb: TBitmap;

This is the the bitmap for the horizontal ruler.
In other words, it's the "
v" thing on the slider --> |----|----|-v---|---|)


Property ImageVRuler
Declaration: ImageVRuler: TBitmap;

This is the the bitmap for the vertical ruler.
In other words, it's the "
---" thing on the slider --> |----|----|-v---|---|)


Property ImageVThumb
Declaration: ImageVThumb: TBitmap;

This is the the bitmap for the horizontal ruler.
In other words, it's the "
v" thing on the slider --> |----|----|-v---|---|)


Property Increment
Declaration: Increment: Longint;

The property Increment is the amount the Value changes when the user presses the arrow keys.

(In other words, if the increment is set to 10, the value changes by +/- 10 per change.)


Property MaxValue
Declaration: MaxValue: Longint;

MaxValue is the maximum Value the thumb of the TRxSlider can move upto.

Use MaxValue to set an upper limit to the Value that can be represented using the slider. The thumb of the slider indicates the current Value in a range between MinValue and MaxValue.


Property MinValue
Declaration: MinValue: Longint;

MinValue specifies the minimum Value of a TRxSlider.
Use MinValue to set an lower limit to the Value that can be represented using the slider. The thumb of the slider indicates the current Value in a range between MinValue and MaxValue.


Property NumThumbStates
Declaration: NumThumbStates: TNumThumbStates;

This is the number of thumb states. This allows the flexibility of using a double image or a single image.

In other words:
____disabled thumb = v
____enabled thumb = v

__The bitmap is vv.
____NumThumbStates = 1, Enabled = True _--> |----|----|-vv---|---|)
____NumThumbStates = 1, Enabled = False --> |----|----|-vv---|---|)

__The bitmap is vv.
____NumThumbStates = 2, Enabled = True _--> |----|----|-v---|---|)
____NumThumbStates = 2, Enabled = False --> |----|----|-v---|---|)


Property Options
Declaration: Options: TSliderOptions;

These are the possible values that can be included in the Options set for the TRxSlider control:

  • soSmooth - determines whether the thumb are moved smooth or step-by-step when the user move mouse pointer;
  • soShowPoints - determines whether tick marks are displayed along the track.
  • soShowFocus - indicates whether TRxSlider should draw a focus rectangle around self when it has input focus.

Property Orientation
Declaration: Orientation: TSliderOrientation;

The orientation specifies whether the slider bar is horizontal (soHorizontal) or vertical (soVertical).


Property Value
Declaration: Value: Longint;

The property Value contains the current position of the slider of a TRxSlider control.

Value is always in the range between MinValue and MaxValue (inclusive). Set Value to programmatically move the slider to a new value.


Event OnDrawPoints
Declaration: OnDrawPoints: TNotifyEvent;

This event is triggered when the points are drawn.

(This is used where another thing is drawn (e.g., attaching a needle) or to counts the number of points on the slider)


Method DefaultDrawPoints
Declaration:
procedure DefaultDrawPoints(PointsStep, PointsHeight, ExtremePointsHeight: Integer); virtual;

This allows the user to draw the points of the RxSlider instead of using the default settings.
In other words, the programmer draws the "
|" thing on the slider --> |----|----|--v--|---|)

Example, draw a blue notch for every 5 points.


Type TNumThumbStates
Declaration: TNumThumbStates = 1..2;

TNumThumbStates is the type for the NumThumbStates property of TRxSlider component.


Type TSliderOption
Declaration: TSliderOption = (soShowFocus, soShowPoints, soSmooth);

TSliderOption is a set of values for the Options property of the TRxSlider component.


Type TSliderOptions
Declaration: TSliderOptions = set of TSliderOption;

TSliderOptions is a set of values for the Options property of the TRxSlider component.


Type TSliderOrientation
Declaration: TSliderOrientation = (soHorizontal, soVertical);

TSliderOrientation defines the values for the Orientation property of TRxSlider. The possible values are soHorizontal (default, slider is horizontal) or soVertical (slider is vertical).


Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000