AddSliderControl

>>-anAdvancedControl~AddSliderControl(--id--,--+---------------+--,--x-->
                                               +-attributeName-+

>--,--y--,--cx--,--cy--+---------------------------------+--)----------><
                       |       +--------------------+    |
                       |       V                    |    |
                       +-,--"----+-AUTOTICKS------+-+--"-+
                                 +-NOTICKS--------+
                                 +-HORIZONTAL-----+
                                 +-VERTICAL-------+
                                 +-TOP------------+
                                 +-BOTTOM---------+
                                 +-LEFT-----------+
                                 +-RIGHT----------+
                                 +-BOTH-----------+
                                 +-ENABLESELRANGE-+
                                 +-GROUP----------+
                                 +-HIDDEN---------+
                                 +-NOTAB----------+
                                 +-NOBORDER-------+


The AddSliderControl method adds a slider control (track bar) to the dialog and connects it with a data attribute. For further information on slider controls, refer to SliderControl Class.

Arguments:

The arguments are:

id

A unique identifier assigned to the control. You need the ID to refer to this control in other methods.

attributeName

The name of the data attribute associated with the dialog item. See attributeName to get information on what happens when this argument is omitted.

x, y

The position of the upper left corner of the control relative to the dialog, in dialog units.

cx, xy

The width and height of the dialog item, in dialog units.

options

This argument determines the behavior and style of the dialog item and can be one or more of the following:

AUTOTICKS

Creates a slider that has a tick mark for each increment in its range of values. These tick marks are automatically added when an application calls the InitRange method. You cannot use the SetTickAt and SetTickFrequency methods to specify the position of the tick marks when you use this option.

NOTICKS

Creates a slider that does not display tick marks.

HORIZONTAL

Orients the slider horizontally. This is the default orientation.

VERTICAL

Orients the slider vertically.

TOP

Displays tick marks along the top of a horizontal slider.

BOTTOM

Displays tick marks along the bottom of a horizontal slider. This option can be used together with the TOP option to display tick marks on both sides of the slider control.

LEFT

Displays tick marks along the left of a vertical slider.

RIGHT

Displays tick marks along the right of a vertical slider. This option can be used together with the LEFT option to display tick marks on both sides of the slider control.

BOTH

Displays tick marks on both sides of the slider in any direction.

ENABLESELRANGE

Displays a selection range. If you set this option, the tick marks at the starting and ending positions of a selection range are displayed as triangles and the selection range is highlighted. This can be used, for example, to indicate a preferred selection.

GROUP

Specifies the first control of a group of control in which the user can move from one control to the next with the arrow keys.

HIDDEN

The control is initially hidden.

NOTAB

The tab key cannot be used to move to this control.

NOBORDER

No border is drawn around the control.

Example:

The following example creates a vertical slider control at the right border of the dialog. The slider with ID PRESSURE displays automatic tick marks on both sides. Its position is associated with attribute PRESSURE.

MyDialog~AddSliderControl("PRESSURE", , MyDialog~sizeX-30, 15, 20, ,
MyDialog~sizeY-30, "VERTICAL BOTH AUTOTICKS")