Mark Read Well-Known Member Licensed User Longtime User Mar 11, 2016 #1 I have a series of choice boxes. A selection is made and the values (not the index) are saved to a file. I want to load the file and set the choice boxes to the selected values. Without a loop to scroll through all values and find a matching one, is there another way? Many thanks.
I have a series of choice boxes. A selection is made and the values (not the index) are saved to a file. I want to load the file and set the choice boxes to the selected values. Without a loop to scroll through all values and find a matching one, is there another way? Many thanks.
Erel B4X founder Staff member Licensed User Longtime User Mar 13, 2016 #2 Code: Copy Dim index As Int = ChoiceBox1.Items.IndexOf(Value) If index > -1 Then ChoiceBox1.SelectedIndex = i Upvote 0
Code: Copy Dim index As Int = ChoiceBox1.Items.IndexOf(Value) If index > -1 Then ChoiceBox1.SelectedIndex = i
Mark Read Well-Known Member Licensed User Longtime User Mar 13, 2016 #3 Erel, that is super, only I made a mistake. They are comboboxes not choiceboxes. I assume the code is the same. Many thanks. Upvote 0
Erel, that is super, only I made a mistake. They are comboboxes not choiceboxes. I assume the code is the same. Many thanks.