Feature request: Allow Wisje.Web.MenuItems to be alligned to the right

0
0

Hi,

It’s not possible to align menu items to the right on a WiseJ.Web.MenuBar (or I’m not doing it right). This is commonly used to seperate menu’s like “About” and “Help”. This is also not possible with the ToolBar control however with the ToolBar you can create an empty disabled button with its autosize property set to spring/fill.

 

Thanks

  • You must to post comments
0
0

Good suggestion, will add to the enhancements.

For the toolbar, you can use the Separator set the SizeMode to Fill. If you don’t want to show the vertical line of the separator set the AppearanceKey to something else, like “none”.

For the menuBar you can already achieve the same by adding this this InitScript of the MenuBar:

var separator = this.getMenuBar().getMenuItems()[1];
separator.setLayoutProperties({flex:1});
separator.setAppearance("");

Assumes that the second item is the separator. Change the javascript however works for you.

{flex:1} will fill to use the available space. You can have multiple separators. You can also make the menu items grow to fill. If multiple items have the flex property it will be proportional, use flex:100, flex:50 or any other value. It’s a typical HBox layout.

 

Attachment
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.