M mscientist33 Active Member Licensed User Dec 7, 2021 #1 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?
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 Dec 7, 2021 #2 B4X: Copy dim l as list = combobox.items Upvote 0
M mscientist33 Active Member Licensed User Dec 7, 2021 #3 I see a mycombo.cmbBox.getitem(index) but do not see a cmbBox.items Upvote 0
M Mahares Expert Licensed User Longtime User Dec 7, 2021 #4 But your combobox items had to be generated from a list. You can clone that list Upvote 0
M mscientist33 Active Member Licensed User Dec 7, 2021 #5 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
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.
Andrew (Digitwell) Well-Known Member Licensed User Longtime User Dec 8, 2021 #6 mscientist33 said: 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. Click to expand... 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
mscientist33 said: 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. Click to expand... 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.