padvou Active Member Licensed User Longtime User Feb 12, 2013 #1 In previous version I could declare a sub for example Spinner1_Click The current version throws an error. Is there away to fire an event when a spinner is clicked? (Not the item clicked)
In previous version I could declare a sub for example Spinner1_Click The current version throws an error. Is there away to fire an event when a spinner is clicked? (Not the item clicked)
padvou Active Member Licensed User Longtime User Feb 12, 2013 #3 java.lang.RuntimeException: java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead Upvote 0
java.lang.RuntimeException: java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead
stevel05 Expert Licensed User Longtime User Feb 12, 2013 #4 I don't see that behavior, it's working correctly here. Can you post your code? zip the project from the IDE if possible. Upvote 0
I don't see that behavior, it's working correctly here. Can you post your code? zip the project from the IDE if possible.
padvou Active Member Licensed User Longtime User Feb 12, 2013 #5 Are you using the 2.50 version? In 2.22 it was working. Try and add a spinner from the designer, generate a member so that it adds "Dim spinner1 as spinner" Then manually add a Sub spinner1_Click End Sub You get the error... I 'll try and export the project Upvote 0
Are you using the 2.50 version? In 2.22 it was working. Try and add a spinner from the designer, generate a member so that it adds "Dim spinner1 as spinner" Then manually add a Sub spinner1_Click End Sub You get the error... I 'll try and export the project
stevel05 Expert Licensed User Longtime User Feb 12, 2013 #6 The correct sub signature should be: Code: Copy Sub Spinner1_ItemClick (Position As Int, Value As Object) End Sub If you're not sure, you can type: Sub then a space, then tab will list the available types, select one and press return and a list of available methods will be displayed, select one of those, then type the field name and press return. Last edited: Feb 12, 2013 Upvote 0
The correct sub signature should be: Code: Copy Sub Spinner1_ItemClick (Position As Int, Value As Object) End Sub If you're not sure, you can type: Sub then a space, then tab will list the available types, select one and press return and a list of available methods will be displayed, select one of those, then type the field name and press return.
padvou Active Member Licensed User Longtime User Feb 12, 2013 #7 Sure, but I want to fire an event as soon as the spinner is clicked. Not an item on the drop down list. Attachments test.zip test.zip 6.8 KB · Views: 353 Upvote 0
Sure, but I want to fire an event as soon as the spinner is clicked. Not an item on the drop down list.
padvou Active Member Licensed User Longtime User Feb 12, 2013 #8 padvou said: Sure, but I want to fire an event as soon as the spinner is clicked. Not an item on the drop down list. Click to expand... Or maybe I could add a button to do that, but as soon as it's clicked it must expand the list of the spinner. Is that possible? Upvote 0
padvou said: Sure, but I want to fire an event as soon as the spinner is clicked. Not an item on the drop down list. Click to expand... Or maybe I could add a button to do that, but as soon as it's clicked it must expand the list of the spinner. Is that possible?
Erel B4X founder Staff member Licensed User Longtime User Feb 12, 2013 #9 See this thread: label over spinner Upvote 0
stevel05 Expert Licensed User Longtime User Feb 12, 2013 #10 Here is an invisible panel that will call the spinners on click via reflection. Edit: Erel beat me to it! Attachments spinnerclick.zip spinnerclick.zip 7.2 KB · Views: 478 Upvote 0
Here is an invisible panel that will call the spinners on click via reflection. Edit: Erel beat me to it!
padvou Active Member Licensed User Longtime User Feb 12, 2013 #11 Thank you both. I' ll give it a try Upvote 0