[Gambas-user] how to fill combobox with specific index from a array matrix
PICCORO McKAY Lenz
mckaygerhard at ...626...
Fri Jan 31 21:04:02 CET 2014
>> do the following: create a String[] aResult or something. Then use the
>> hresult["whatever_id"], converted to an Integer, as index:
>>
>> aResult.Add(hresult["payload"], CInt(hresult["whatever_id"]))
>>
> umm this mees might work like the collection idea also
dont work!!! combobox auto enumrate the index, so i'll try now with collection
>> Later, return that String[] as you do.
>>
>> Then, when filling the ComboBox, all the elements you didn't assign anything
>> to (the missing "whatever_id"'s will be Null):
>>
>> Dim aResult As String[] = GetTheResultArray()
>> Dim iInd As Integer
>>
>> For iInd = 0 To aResult.Max
>> If Not aResult[iInd] Then Continue
>> myComboBox.Add(aResult[iInd], iInd)
>> Next
>>
>> Whether this works (your question below) or how it will look like if some
>> indices in the ComboBox are missing, I don't know. Test it!
how can i fill the combobox but u must note the resultset object are
not in same class
i use a class for data and other for fill combox
SO THE QUESTION ITS:
how can i use colletions to fill the combobox?
More information about the User
mailing list