With only this code too I get the double-sized toolbar, as you can see in the
attached image.
Command backCommand=new Command("Back") {
@Override
public void actionPerformed(ActionEvent evt) {
parentForm.showBack();
}
};
getToolbar().setBackCommand(backCommand);
Il giorno lunedì 17 agosto 2020 03:43:26 UTC+2, Shai Almog ha scritto:
>
> 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/af99d8ec-7ea1-4de1-940f-44cfc9232151o%40googlegroups.com.