Spinner Prompt before clicking

bishmedia

Member
Licensed User
Longtime User
If i wanted the spinner to say something like "Select Competition" before it is clicked, how would i go about this??

I know
spinner1.promt = "Select Competition"
works but this is AFTER ive clicked and
spinner1.text
is not allowed !!

Anyone??
 

Mahares

Expert
Licensed User
Longtime User
Before you load your spinner items, simply add a first item to your spinner that says:
B4X:
spinner1.add("SELECT COMPETION")

Sub spinner1_ItemClick (Position As Int, Value As Object)
  If position=0 then
     msgbox("Must select an item from the list","")
     return
  end if
end sub
 
Upvote 0

bishmedia

Member
Licensed User
Longtime User
yeah that's kinda what i was looking at, its a shame you cant have the prompt prior to clicking rather than adding it via .Add :)

But thankyou :)
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
If you do not want to add a spinner item, just add a label above the spinner that says: lblBish.text="SELECT A COMPETITION FROM BELOW LIST"
 
Upvote 0

Trinity Programming

Member
Licensed User
Longtime User
It would be nice though as @bishmedia said with the prompts because in my app users make a selection from the spinner, and I want to be able to save this selection, and then display it in the prompt of the spinner when the user goes back to the page that the spinner is on so they can remember what they selected.
 
Upvote 0
Top