I'm having some trouble modifying SideMenu commands since the last JavaSE
update.
Test case below shows the problem. Expected result is: clicking on the
command will remove it. Actual result is: clicking in the command doesn't
seem to do anything.
Toolbar.setGlobalToolbar(true);
Form hi = new Form("Entrada");
Style s = UIManager.getInstance().getComponentStyle("TitleCommand");
FontImage icon = FontImage.createMaterial(FontImage.MATERIAL_WARNING,
s);
Command cmd = hi.getToolbar().addCommandToRightBar("Bla", null, (e) ->
Log.p("Bla"));
hi.getToolbar().addCommandToSideMenu("Remove", null, (e) -> {
hi.removeCommand(cmd);
hi.revalidate();
});
Also, after adding commands to the sidebar, hi.getCommandCount()
returns 0.
Is this a deliberate change? Is there a better way of making "dynamic"
SideMenu's? (being able to remove certain commands and put new ones).
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
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/a8382c3e-f47f-4c29-99c7-77d7d144b8a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.