Use toolbar.setBackCommand(). Or toolbar.addMaterialCommand* methods etc.

On Sunday, August 16, 2020 at 8:47:47 PM UTC+3 P5music wrote:

> I added the back functionality to forms that call one another
> A->B->C
>
> I put a button on the toolbar, otherwise the back command is not visible.
>
> Button backButton=new Button("back");
> Command backCommand=new Command("Back") {
>     @Override
>     public void actionPerformed(ActionEvent evt) {
>         mainForm.showBack();
>     }
> };
>
> backButton.setCommand(backCommand);
> getToolbar().add(BorderLayout.WEST,backButton);
>
>
> but the result is a doubled toolbar, as you can see in the attached image.
> And you can also see that the message is "Back", not "back".
> So it's not the Button displayed there, but if I do not add it, nothing is 
> displayed. It's strange.
> What's wrong?
> Thanks in advance
>
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/f07c2858-d6e2-4e79-b058-644505ba4365n%40googlegroups.com.

Reply via email to