How to hide the Servoy Menu and Toolbar.

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:

  1. Select the currently running Solution in Solution Explorer.
  2. 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.

  1. The Select Method popup will appear. Press the Scope button.

  1. Keep the default method name of onSolutionOpen and just click the Create button.

  1. The Select Method popup will reappear. Make sure the method stub we just created onSolutionOpen(arg,queryParams) is selected.
  2. 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. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *