iOS Question Picker component - finding an item

rfresh

Well-Known Member
Licensed User
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...
 

rfresh

Well-Known Member
Licensed User
I ended up coding this solution:

B4X:
    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
Top