greetings , I created some spinner by code., thanks
B4X:
Sub InitEditPanel
Dim spiner(Starter.ColNumber) As Spinner
spiner(i).Initialize("Spiner")
spiner(i).TextSize=14
spiner(i).Tag = i
scvEdit.Panel.AddView(spiner(i), edtLeft + edtWidth + 65, 18dip + i * VSpace, 45dip, 40dip)
Next
The problem is how can I make use of a specific spinner if I have only one method for all,tks
B4X:
Sub spiner_ItemClick (Position As Int, Value As Object)
edt(5).Text=spiner(5).GetItem(spiner(5).SelectedIndex)
End Sub
1. Use a List instead of an array (named Spinners).
2.
B4X:
Sub spiner_ItemClick (Position As Int, Value As Object)
Dim Spinner1 As Spinner = Sender
Dim index As Int = Spinners.IndexOf(Spinner1)
edt(index).Text = Value
...
End Sub