Set ComboBox to "unselected?"

BlitzMax Forums/BlitzMax Programming/Set ComboBox to "unselected?"

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Great, thanks Tony.

As usual I have not seen this command in the docs.. :(

Strict 

Local window:TGadget
Local button:TGadget
Local combobox:TGadget

window=CreateWindow("My Window",30,20,200,200)
button=CreateButton("Deselect",10,82,70,24,window,BUTTON_OK)

combobox=CreateComboBox(4,4,120,22,window)
AddGadgetItem combobox,"Item 1"
AddGadgetItem combobox,"Item 2"
AddGadgetItem combobox,"Item 3",True
AddGadgetItem combobox,"Item 4"

While WaitEvent()
	Select EventID()
		Case EVENT_GADGETACTION
			Print "eventdata="+EventData()
		Case EVENT_WINDOWCLOSE
			End
	End Select

	Select EventSource() 		 
		Case Button 
		   DeselectGadgetItem (combobox, SelectedGadgetItem(combobox)) 
	End Select
Wend