auto select first option on an AutoCompleteTextField?

46 views
Skip to first unread message

Gareth Murfin

unread,
Aug 12, 2018, 11:27:40 PM8/12/18
to CodenameOne Discussions
How do you auto select first option on an AutoCompleteTextField? so it doesnt sit there white i want first option to be "please select an option", but if I use settext it clears my list.

Shai Almog

unread,
Aug 13, 2018, 12:32:58 AM8/13/18
to CodenameOne Discussions
We don't currently support that, I'm not sure how something like that would behave as select means inputting the data which would clear the list.

Thomas

unread,
Aug 13, 2018, 12:52:32 AM8/13/18
to CodenameOne Discussions
Did you try to set "please select an option" with setHint()? 

Gareth Murfin

unread,
Aug 14, 2018, 2:57:35 AM8/14/18
to CodenameOne Discussions
I didnt, I will try that Thomas. Also Shai, it could just be like setSelectedIndexInList(0) I would have thought.

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/7MfVsacC88U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/08a89d71-7685-4428-b471-55141bb7f232%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Gareth Murfin
(Android Freelancer - www.garethmurfin.co.uk)

Shai Almog

unread,
Aug 14, 2018, 11:24:05 PM8/14/18
to CodenameOne Discussions
If we invoke that then you would tap the text field. First entry will be "selected" but you won't see it in a touch device as selection is only rendered while touching.
Reply all
Reply to author
Forward
0 new messages