Using AutoCompleteTextField as ComboBox replacement

20 views
Skip to first unread message

mcw

unread,
Oct 22, 2016, 12:55:02 PM10/22/16
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Plugin 3.5.6

Couldn't figure how to login to whatever you are using for blogs these days so figured I would post here.

I cannot compile your sample code for using an AutoCompleteTextField as a ComboBox replacement

Enter code here...
String[] characters = { "Tyrion Lannister", "Jaime Lannister", "Cersei Lannister", "Daenerys Targaryen",
   
"Jon Snow" /* cropped */
};

Form hi = new Form("Picker");
AutoCompleteTextField act = new AutoCompleteTextField(characters);
act
.addActionListener(e -> ToastBar.showMessage("You picked " + act.getText(), FontImage.MATERIAL_INFO));
Button down = new Button();
FontImage.setMaterialIcon(down, FontImage.MATERIAL_KEYBOARD_ARROW_DOWN);
hi
.add(
       
BorderLayout.center(act).
                add
(BorderLayout.EAST, down));
down
.addActionListener(e -> act.showPopup());
hi
.show();


I get an error on act.showPopup(). According to Netbeans there is no showPopup() method. I have the latest plugin and project libs are up to date.

Thanks


Shai Almog

unread,
Oct 22, 2016, 9:59:58 PM10/22/16
to CodenameOne Discussions
We are using disqus.which is pretty standard although I did run into issues with it from here... Maybe it was having hiccups because of the DNS outage yesterday.


I've commited this on October 12th so it should be in the latest Friday update without a question. I've had some weird things in the build so I'll verify this... We might need to push out a new release again.
Reply all
Reply to author
Forward
0 new messages