Help Contents / GUI programming / ComboBoxes / ComboBoxSetSelection

ComboBoxSetSelection acombobox selection

Command to set the selection of the ComboBox acombobox to the value selection. 

selection is a zero-based integer index into the choices, which must be less than the number of choices in the control. 

Example: 

	cb=(ComboBox [][MyComboBox][Initial string] 
		[	[String 1] 
			[and a second string] 
			[and the last string] 
		] 
		[	(show "|MyComboBox| ComboBoxSelection) 
		] 
		[	(pr [change] ComboBoxValue) 
		] 
		[	v=ComboBoxValue 
			(pr [enter] v) 
			ComboBoxAppend cb v 
		] 
		wxCB_simple [-1 -1][300 200]) 
	ComboBoxSetSelection cb 1 


previous: ComboBoxSelection	next: ComboBoxSetChoices
