Menu for multiple windows

Hi,

We are currently using Servoy 6 and our modules are displayed through different multiple windows. Does Servoy have a menu bean or any type of element which we can use to display our menu items? The menu items should be on top of all opened windows.

Kind Regards,
Erik

Hi Erik,

Check out the Window plugin that comes with Servoy. This will handle popupmenu’s and such but also menubar menus, even per window (actually you do it PER window).

Hope this helps.

Hi Robert thanks for the reply.

We wanted a menu for all windows, and not per window. Something like the “Start” menu of an Operating System, where the Start menu is always on top of the dialogboxes. Is this currently possible in Servoy?

You can add menu items to the main menu bar which will remain visible above all forms. However, under certain conditions like when using popup-forms the menu will be disabled. To add a menu item to the main menu:

var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
menu.addMenuItem("item", myMethod);

Note that the method that handles the menu click should be specified without the parentheses.

Kind regards,

Hi Omar,

Thanks for the reply.

I will try this your suggestion.

Cheers!

Hi Omar,

Your suggestion is working fine. Another question, is there a way to use CSS for style of the menu? Or can I use HTML to design the menu?

Cheers!

Hi Omar,

If HTML/CSS is not possible, is there just a simple way to set the font of the menu items and the spacing in between items?

Thanks!

Hi Erik,

Not that I am aware of no, sorry. The only styling aspect I can think of is setting the fore- and backgroundcolor of the menuItem.

Ok, thanks Omar.