I can't get a response from a spinner and I don't understand why.
I have a spinner defined, initialized, allocated it content and I get the list displayed when pressing on the arrow.
B4X:
tgtspin.Initialize(tgtspin)
Activity.AddView(tgtspin,140dip,0,40dip,38dip)
....
For i = 1 To route.Size
tgtspin.Add("Target # " & i)
Next
tgtspin.Enabled = True
The event sub is not entered at item click:
B4X:
Sub tgtspin_ItemClick (Position As Int, Value As Object)
tgtno = tgtspin.SelectedIndex + 1
tgtlabel.Text = tgtspin.SelectedIndex + 1
'tgtno = position + 1
'tgtlabel.Text = position + 1
End Sub
(I tried two options until I found that it does not enter).:sign0085:
some views (like the spinner) will not function fully unless they are added to the activity by code.
If I design them by the visual designer and add them by code I get an error and have to delete them from the designer.
this means that the designer is only good for puting the view in place.
In what way does a spinner not function? You should be able to add one in the designer and use Tools -> Generate Members to put a Dim line in Sub Globals and an event Sub if needed. The event name can be entered in the designer properties panel before generating the required members.
Agraham, all this works fine but unless you addview in code for the same spinner, when you press it you'll see only one empty line, inspite loading it with a list before.
some views (like the spinner) will not function fully unless they are added to the activity by code.
If I design them by the visual designer and add them by code I get an error and have to delete them from the designer.
this means that the designer is only good for puting the view in place.