>>-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.
The arguments are:
A unique identifier assigned to the control. You need the ID to refer to this control in other methods.
The name of the data attribute associated with the dialog item. See attributeName to get information on what happens when this argument is omitted.
The position of the upper left corner of the control relative to the dialog, in dialog units.
The width and height of the dialog item, in dialog units.
This argument determines the behavior and style of the dialog item and can be one or more of the following:
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.
Creates a slider that does not display tick marks.
Orients the slider horizontally. This is the default orientation.
Orients the slider vertically.
Displays tick marks along the top of a horizontal slider.
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.
Displays tick marks along the left of a vertical slider.
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.
Displays tick marks on both sides of the slider in any direction.
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.
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.
The control is initially hidden.
The tab key cannot be used to move to this control.
No border is drawn around the control.
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")