codename one how to make a drop down list of items

378 views
Skip to first unread message

hiba....@gmail.com

unread,
Sep 25, 2017, 5:27:52 PM9/25/17
to CodenameOne Discussions

am new to codename one and i want to know which component allows me to implement a drop down list of items associated with images for single selection by the user like selecting online supermarket to buy from ... am using netbeans IDE and targeting android and ios 

Shai Almog

unread,
Sep 26, 2017, 12:22:53 AM9/26/17
to CodenameOne Discussions
Technically it's ComboBox or auto complete but I wouldn't use combo box: https://www.codenameone.com/blog/tip-dont-use-combobox.html

If you want auto complete here's how you can add pictures to it: https://www.codenameone.com/blog/tip-auto-complete-renderer.html

hiba....@gmail.com

unread,
Sep 26, 2017, 3:32:46 AM9/26/17
to CodenameOne Discussions
this is why i asked you about that because i read the article (don't use combo box) and because of that i was confused what component to use,
am really very much interested in codename one and now developing my first application with it ... the idea is that i have a delivery man who delivers the products of the company to the supermarkets and malls , after delivering the product the delivery man should sign in and choose the supermarket that he delivered the product to from a drop down list , then select the product that has been delivered from another drop down list ,.... etc in order to register the sales operations and produce receipts. the problem i faced is to choose the suitable component to achieve that ... i will come back to you again because the step after this is to connect this application with SAP database through an API  

Shai Almog

unread,
Sep 27, 2017, 12:06:25 AM9/27/17
to CodenameOne Discussions
There are several suggestions for alternatives in that article. Personally I would like auto-complete for that as it allows a person to type in a partial name.

For backend connection you need to write a webservice in the backend to which you can connect. There is a sample of this here: https://www.codenameone.com/blog/dynamic-autocomplete.html
Reply all
Reply to author
Forward
0 new messages