[Gambas-user] Help with combobox loop please

Jacky jscops at ...11...
Tue Apr 25 08:25:26 CEST 2006


Le Mardi 25 Avril 2006 07:41, Shannon Kuchler a écrit :
> what i need to do is loop through a combobox's drop down list and im not
> sure of the syntax
> ie...
>
> if combobox1.text = anything in the combobox1.list then
> print "item already in list"
> else
> do this
> end if
>
> can anyone help please?

Bonjour Shannon,

Combobox1.add(Combobox1.text, Combobox1.text)
Combobox1.item[0] = Combobox1.text
Catch
Combobox1.MoveFirst
repeat
Combobox1.Item.selected = true
If Combobox1.Item[0] = Combobox1.Text then
	Print "Already in List"
else
	Do something
endif
until Combobox1.Movenext()

Jack.





More information about the User mailing list