ToggleButton

Help Contents GUI programming ToggleButtons ToggleButton
ToggleButtons ToggleButtonDestroy

ToggleButton parent alabel onclick
(ToggleButton parent alabel onclick style apos size)


outputs a new ToggleButton on the parent (a Frame or a Graph),

having the text alabel on it,

and running the onclick instructionlist when the user clicks with the mouse on it.

style is the window style, defaults to 0.

apos is the position of the Button (a list of two integer numbers, x and y),

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

Examples:

tbpd=ToggleButton [][Pen Down][
	ifelse ToggleButtonValue tbpd [PenDown][PenUp]
	updateGraph]
tbht=(ToggleButton [][Hide Turtle][
	ifelse ToggleButtonValue tbht [hideTurtle][showTurtle]
	updateGraph]
	wxBU_LEFT+wxBU_TOP [0 100][200 100])

Examples:

References:

ToggleButtons ToggleButtonDestroy