Android Question B4XCombobox items to list

mscientist33

Active Member
Licensed User
I know we can set the items inside a combobox using a list, is there a way to put all items in a combox in a list without having to iterate through the whole combobox?

ex: combobox.items.tolist type call?
 

DonManfred

Expert
Licensed User
Longtime User
B4X:
dim l as list = combobox.items
 
Upvote 0

mscientist33

Active Member
Licensed User
I just looped through a database rs and added each item that way. Was hoping I could export the items to a list then add and remove and change items and reset the combobox to the new edited list without having to hit the database again.
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
I just looped through a database rs and added each item that way. Was hoping I could export the items to a list then add and remove and change items and reset the combobox to the new edited list without having to hit the database again.
At the time, you are looping through the database add them to a list instead of the combo box.
At the end of the loop use combobox.setitems to set the list to the combobox.

You now have a list and the items int he combobox.
 
Upvote 0
Top