Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » RAP theming Menu Bar(not understanding the selector)
RAP theming Menu Bar [message #1245880] Fri, 14 February 2014 06:54
Eclipse UserFriend
Hi,

We've been redrawing the Web Entry Point so that we can have a different toolbar and a more traditional Menu Bar.
After extending some internal classes the behavior was achieved and both are created.
My doubt is on the selector to use for styling the Menu Bar!
First it doesn't seem to be affected by "Menu" selector. Also seeing the generated ID it gives "w4" so not much of a clue there.
To go around this we've added a CUSTOM_VARIANT, and using as selector "*.mainMenuBar" we've been able to set the background-color / image.

So which selector should we be using for this Main Menu?

The menu is being generated as:

  protected void createMenubar(Composite theParent) {
    Menu menu = new Menu(theParent.getShell(), SWT.BAR);
    menu.setData(RWT.CUSTOM_VARIANT, VARIANT_MAIN_MENU_BAR);

    RwtMenuUtility.fillContextMenu(getScoutObject().getMenus(), getUiEnvironment(), menu);

    theParent.getShell().setMenuBar(menu);
  }


Current CSS:

*.mainMenuBar {	
	background-image: gradient(linear, left top, left bottom, from(#ffffff), color-stop(52%, #e0e0e0), to(#b0b0b0));
}


  • Attachment: mainMenu.jpg
    (Size: 12.44KB, Downloaded 186 times)

[Updated on: Fri, 14 February 2014 06:55] by Moderator

Previous Topic:How to rappresent XML in a tree field
Next Topic:Cannot Close Outline using OutlineViewButton
Goto Forum:
  


Current Time: Sun Jul 06 11:59:26 EDT 2025

Powered by FUDForum. Page generated in 0.23829 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top