Help Contents / GUI programming / ChoiceBoxes / ChoiceBox

ChoiceBox parent name choices onSelect
(ChoiceBox parent name choices onSelect style pos size)

outputs a new ChoiceBox and shows it on the parent (a Frame or a Graph, main Graph if []). Unlike a listbox, only the selection is visible until the user pulls down the menu of choices. 

name is its label text. 

choices is a list of items from whom the user can select one. 

onSelect is a Logo instructionlist which will be run when the user selects a choice. 

style is the window style, nothing special here, it defaults to zero. 

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

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

Example: 

	cb=(ChoiceBox [][MyChoiceBox] 
	[	[String 1] 
		[and a second string] 
		[and the last string] 
	] 
	[	(show "|MyChoiceBox| ChoiceBoxSelection) 
	]) 


next: ChoiceBoxDestroy
