How to hide the Servoy Menu bar and Toolbar.
Just another quick Servoy related post today.
Sometimes you just want a very simple and easy to use interface for a Solution. So it’d be nice to hide the menu bar and toolbar at the top of the Servoy window.
So today I’ll show you – using far too many pictures – but it makes this lame post look bigger – how to completely hide the Servoy menu bar and toolbar.
Above: A Servoy form yesterday, plagued by the very top bars we want to remove.
SO, here is how to do it:
- Select the currently running Solution in Solution Explorer.
- The Properties list on the right hand side of the screen should change to the Solution’s configuration options. Double click on -none- next to the onOpen option.
- The Select Method popup will appear. Press the Scope button.
- Keep the default method name of onSolutionOpen and just click the Create button.
- The Select Method popup will reappear. Make sure the method stub we just created onSolutionOpen(arg,queryParams) is selected.
- Click the OK & Show button.
Servoy will open the stub method onSolutionOpen we just created. Now copy the three lines of code below into it:
plugins.window.getMenuBar().setVisible(false); plugins.window.setStatusBarVisible(false); plugins.window.setToolBarAreaVisible(false);
And the menu bar and toolbar are gone. 🙂