rfresh Well-Known Member Licensed User Longtime User Feb 9, 2019 #1 I have two picker components. When I manually select one of them, I want the other Picker to update with the same selection. How can I do this in code? Do I have to use a for loop? For example, in Picker #1, if I manually select '3.3' I'd like Picker #2 to update and show '3.3' as well. Thank you...
I have two picker components. When I manually select one of them, I want the other Picker to update with the same selection. How can I do this in code? Do I have to use a for loop? For example, in Picker #1, if I manually select '3.3' I'd like Picker #2 to update and show '3.3' as well. Thank you...
Erel B4X founder Staff member Licensed User Longtime User Feb 10, 2019 #2 Something like: Code: Copy p.SelectRow(0, p.GetItems(0).IndexOf(...), True) Upvote 0
rfresh Well-Known Member Licensed User Longtime User Feb 10, 2019 #3 I ended up coding this solution: Code: Copy tList = PickerGradient.GetItems(0) For iVal = 0 To tList.Size - 1 str0 = tList.Get(iVal) If str0 = strTarget Then Log("found") PickerGradient.SelectRow(0,iVal,False) Exit End If Next Upvote 0
I ended up coding this solution: Code: Copy tList = PickerGradient.GetItems(0) For iVal = 0 To tList.Size - 1 str0 = tList.Get(iVal) If str0 = strTarget Then Log("found") PickerGradient.SelectRow(0,iVal,False) Exit End If Next
Erel B4X founder Staff member Licensed User Longtime User Feb 10, 2019 #4 Code: Copy Dim index As Int = PickerGradient.GetItems(0).IndexOf(strTarget) If index > -1 Then Log("found") PickerGradient.SelectRow(0,index,False) End If Upvote 0
Code: Copy Dim index As Int = PickerGradient.GetItems(0).IndexOf(strTarget) If index > -1 Then Log("found") PickerGradient.SelectRow(0,index,False) End If