J junaidahmed Well-Known Member Licensed User Longtime User Apr 17, 2020 #1 I have an Spinner control with five item.I am adding another item in spinner when I click on button.I would like to know how to check item value already exist or not before adding in spinner
I have an Spinner control with five item.I am adding another item in spinner when I click on button.I would like to know how to check item value already exist or not before adding in spinner
klaus Expert Licensed User Longtime User Apr 17, 2020 #2 B4X: If Spinner.IndexOf("YourItem") = -1 Then 'item doesn't exist Else 'item exists End If Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Apr 17, 2020 #3 BTW, a spinner is a user interface element. It is better not to treat it as a data store. B4XSet from B4XCollections is good data store for a collection of unique elements. Upvote 0
BTW, a spinner is a user interface element. It is better not to treat it as a data store. B4XSet from B4XCollections is good data store for a collection of unique elements.