I'm wondering if the Picker component will allow me to pull another value from the visible value that I have selected?
For my project, I need to select a fuel quantity, such as 300 pounds. I then need to take that value and multiply it by another, unique value for 300. Below I populate the Picker with an array of values. I see these values when I show the Picker and the value I pick is the value I then use and it's the one that I see.
I am wondering if I can include a kind of 'hidden' value for each array item and when I select, return that non-visible value?
Does the picker allow me to use it that way?
I'd like to set up the array something like this:
0,0
100,76
200,120
300,223
400,385
and then when I select 300, be able to fetch the 223 value?
For my project, I need to select a fuel quantity, such as 300 pounds. I then need to take that value and multiply it by another, unique value for 300. Below I populate the Picker with an array of values. I see these values when I show the Picker and the value I pick is the value I then use and it's the one that I see.
I am wondering if I can include a kind of 'hidden' value for each array item and when I select, return that non-visible value?
Does the picker allow me to use it that way?
I'd like to set up the array something like this:
0,0
100,76
200,120
300,223
400,385
and then when I select 300, be able to fetch the 223 value?
B4X:
fuelWeights.Initialize2(Array As String("0", _
"100", _
"200", _
"300", _
"400", _
"500"))
PickerFuel.SetItems(0,fuelWeights)
PickerFuel.SelectRow(0,0,False)