Help Contents / GUI programming / Sliders / Slider

Slider parent name min value max onScroll
(Slider parent name min value max)
(Slider parent name min value max onScroll style pos size)

outputs a new Slider on the parent (a Frame or a Graph, main Graph if []). 

name is the label text and the name of the control. 

min is the minimal allowed value that the control accepts. 

value is the number shown at startup of the control. 

max is the maximal allowed value that the control accepts. 

min, value and max must be integer numbers. 

onChange is a command list that will be run if the OnChange event of the control is processed. That's whenever the number in the control changes anyhow. 

style is the window style and can be a combination of the following constants: 

wxSL_HORIZONTAL  Displays the slider horizontally (this is the default). 

wxSL_VERTICAL  Displays the slider vertically. 

wxSL_AUTOTICKS  Displays tick marks. 

wxSL_LABELS  Displays minimum, maximum and value labels. 

wxSL_LEFT  Displays ticks on the left and forces the slider to be vertical. 

wxSL_RIGHT  Displays ticks on the right and forces the slider to be vertical. 

wxSL_TOP  Displays ticks on the top. 

wxSL_BOTTOM  Displays ticks on the bottom (this is the default). 

wxSL_SELRANGE  Allows the user to select a range on the slider. Windows only. 

wxSL_INVERSE  Inverses the mininum and maximum endpoints on the slider. Not compatible with wxSL_SELRANGE. 



pos is the position of the Slider (a list of two integer numbers, x and y), 

size is the size of the Slider (a list of two integer numbers, width and height). 

Example: 

	s=(Slider [][X] -400 0 400 
		[	x=SliderValue 
			(pr "x= x) 
			setXY x y 
			updateGraph 
		] 
		wxSL_horizontal+wxSL_Labels+wxSL_Ticks 
		[10 220][200 80]) 


next: SliderDestroy
