[Gambas-user] RE: Combobox selection Tahara
R Onstenk
ronstk at ...239...
Wed Sep 3 15:10:33 CEST 2003
Hi Tahara
I'm not shure from your question you mean the Combobox
itself or one of the entries in it.
If you want the Combobox is default selected in the form
you can use in main() ComboBox.SetFocus().
If you mean one of the entries in the list you can use 3 ways.
1)
ComboBox.Text="Tahara", it must be the text you want from
the list
2)
Combobox.Index=2, if it is the 3'word in the list
Index is zero based.
Like "aa", "bb", "Tahara", "cc" and "dd"
3)
If the entry position is unknown.
DIM arList as String[]
DIM iEntry as Integer
arList = Split(Combobox.list,"\n")
iEntry = arList.Find("Tahara",gbText)
if iEntry>0 THEN
Combobox.Index = iEntry
ELSE
Message ("Not Found")
ENDIF
------
Ron
More information about the User
mailing list