set text for no editable combobox

BlitzMax Forums/MaxGUI Module/set text for no editable combobox

hub(Posted 2007) [#1]
Hi ! How to select an item into a _no editable_ combobox if you only know the item 'string' value (not the index) ? In my example i want select "three".

no pb if the combobox is editable with setgadgettext
combo = createcombobox (....., COMBOBOX_EDITABLE)
AddGadgetItem Combo, "one"
AddGadgetItem Combo, "two"
AddGadgetItem Combo, "three"
SetGadgetText (combo, "three")


... but how to with the no-editable combobox version ?

Thanks !


grable(Posted 2007) [#2]
For Local i:Int = 0 Until CountGadgetItems( g)
	If GadgetItemText( g,i) = "three" Then
		SelectGadgetItem( g,i)
		Exit
	EndIf
Next



hub(Posted 2007) [#3]
no command to do this ?!?


grable(Posted 2007) [#4]
Do you realy need one defined by BRL?.. it will just do the exact same thing as the code above anyway...