Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • How to remove the background of the menu?

    Hi guys,
    I want to remove the background of the menu. When I click the menu button, the menu has been shown with white background.
    Click image for larger version  Name:	MenuBg.png Views:	1 Size:	8.5 KB ID:	256451

    I try the following code but none of them work.

    menu.setShowEdges(false);
    menu.setBackgroundColor("rgba(0,0,0,0)");
    menu.setBackgroundColor("transparent");

    And it looks like all the showcase of menu are with white background color.

    Dose anyone know how to do it? Thankssssssssssss.

    // buttonLayout is a HLayout and it has around 10 button members.

    IMenuButton btnMenu = null;
    if (buttonLayout.getMembersLength()>5) {

    int lastIndex = buttonLayout.getMembersLength()-1;

    Menu menu = new Menu();

    for(int i = 4; lastIndex > i; lastIndex--) {

    HStack editButtons = new HStack(1);
    editButtons.setDefaultLayoutAlign(VerticalAlignment.CENTER);
    editButtons.setSnapTo("TR");
    editButtons.setHeight("100%");
    editButtons.setMembers(buttonLayout.getMember(lastIndex));

    MenuItem editMenuItem = new MenuItem("");
    editMenuItem.setShowRollOver(false);
    editMenuItem.setEmbeddedComponent(editButtons);

    menu.addItem(editMenuItem);
    buttonLayout.removeMember(buttonLayout.getMember(lastIndex));

    }

    btnMenu = new IMenuButton("More Buttons", menu);
    buttonLayout.addMember(btnMenu);

    }

  • #2
    Hi,

    I'd use Chrome to find the repective class name and edit this in you skin_styles.css.
    Click image for larger version

Name:	Menu.PNG
Views:	1
Size:	40.7 KB
ID:	256454

    See the Quick Start Guide and the Skinning docs.

    Best regards
    Blama

    Comment


    • #3
      Originally posted by Blama View Post
      Hi,

      I'd use Chrome to find the repective class name and edit this in you skin_styles.css.
      Click image for larger version  Name:	Menu.PNG Views:	1 Size:	40.7 KB ID:	256454

      See the Quick Start Guide and the Skinning docs.

      Best regards
      Blama
      Thanks for your help!

      But I find another solution, if I set menu.setCellHeight(30); the background will be disappeared.

      Comment

      Working...
      X