Combobox sample

BlitzPlus Forums/BlitzPlus Programming/Combobox sample

mag.(Posted 2003) [#1]
Anyone can give a sample code on how to make combobox selection work


Beaker(Posted 2003) [#2]
From the Mak samples folder:
window=CreateWindow( "ComboBox demo",0,0,160,120 )

combobox=CreateComboBox( ClientWidth(window)/2-64,ClientHeight(window)/2-12,128,24,window )

For k=0 To 9
AddGadgetItem combobox,"Item "+k
Next

SelectGadgetItem combobox,0

While WaitEvent()<>$803
	If EventID()=$401
		If EventSource()=combobox
			DebugLog "Item selected:"+SelectedGadgetItem(combobox)+" "+GadgetItemText(combobox,SelectedGadgetItem(combobox))
		EndIf
	EndIf
Wend

End



mag.(Posted 2003) [#3]
Thanks