Cannot figure out how to use COMBOBOX_EDITABLE

BlitzMax Forums/BlitzMax Beginners Area/Cannot figure out how to use COMBOBOX_EDITABLE

assari(Posted 2005) [#1]
I'm at a loss as to how to use this ComboBox style.
How do I retrieve the user entered text?
This is my attempt so far
SuperStrict

Local MyWindow:TGadget=CreateWindow("ComboBox Example", 200,200,320,240)
Local ComboBox:TGadget=CreateComboBox(10,10,200,100,MyWindow,COMBOBOX_EDITABLE)
Local GoButton:TGadget=CreateButton("GO",215,10,20,20,MyWindow)
For Local i:Int=1000 To 1050
  AddGadgetItem ComboBox,i
Next
Local s:String
ActivateGadget ComboBox

Repeat
  WaitEvent()
  Select EventID()
  Case EVENT_WINDOWCLOSE
     End
  Case EVENT_GADGETACTION
     Select EventSource()
     Case GoButton
       s=TextFieldText(ComboBox)
       SetStatusText MyWindow, "TextField=" + s '+ "GadgetItemTxet="+GadgetItemText(ComboBox,?)
     Case ComboBox       
       Local i:Int= SelectedGadgetItem(ComboBox)    
       If i>0 s=GadgetItemText(ComboBox,i)
       SetStatusText MyWindow, "index="+i + ":item=" + s
   End Select
   End Select
Forever 	



skidracer(Posted 2005) [#2]
Sorry, GadgetItemText is currently broken with comboboxes, will be fixed in next update.


assari(Posted 2005) [#3]
Thanks for the reply. Looking forward to the fix


Space_guy(Posted 2005) [#4]
I would like this one too.