Contents Up Previous Next

Slider

A slider is a panel item for denoting a range of values. It must be a child of a panel.

slider-create
slider-set-value
slider-get-value


slider-create

long ( slider-create long panel-id string callback string label
long value long min-value long max-value
long width optional long x optional long y optional string style optional string name)

Creates a horizontal slider item on the given panel. The callback may be the empty string ("'') to denote no callback, or a word or string for the function name. The function will be called when the slider value is changed, with the slider item ID as argument.

If no position is given, the panel item is placed after the last item. The value -1 may be passed to denote a default, so that the position may be left unspecified and the size given.

style is a bit list of the following:

wxHORIZONTAL The item will be created as a horizontal slider.
wxVERTICAL The item will be created as a vertical slider.

name gives the slider a name that can be retrieved with window-get-name.


slider-set-value

long ( slider-set-value long slider-id long value)

Set the value of the slider.


slider-get-value

long ( slider-get-value long slider-id)

Gets the value of the slider.