I have added a Container with a 3-column GridLayout as the title component in the Toolbar, which lays out nicely across the full width of the form.
But when I add a command using:
getToolbar().addCommandToSideMenu(new Command("Command"));
then the title component is suddenly reduced to its minimal dimension. The Component Tree Inspector confirms that there is plenty of space, but my grid container is now at its Preferred Size.
When (instead of the command) I add a regular button using:
getToolbar().addComponent(Borderlayout.WEST,new Button("Button"));
then the layout does behave as expected.
What is going on here, and how do I prevent it from happening?