Search code examples
codenameone

Button linked to AutoCompleteTextField


I am trying to implement exact code as in CodenameOne's TIP: Don't Use ComboBox article.

AutoCompleteTextField act = new AutoCompleteTextField(jTypesArr);
act.setMinimumElementsShownInPopup(5);
Button down = new Button();
FontImage.setMaterialIcon(down, FontImage.MATERIAL_KEYBOARD_ARROW_DOWN);
add(BorderLayout.center(act).
add(BorderLayout.EAST, down));
down.addActionListener(evt -> {
act.showPopup();
});

However, down button with act.showPopup(); seems not to be working - it doesn't open the dropdown list. If you click just on AutoCompleteTextField, everything works properly.

Please let me know what is wrong. Thanks!


Solution

  • Issue closed, showPopup() works now. https://github.com/codenameone/CodenameOne/issues/3334