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.
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);
}
I want to remove the background of the menu. When I click the menu button, the menu has been shown with white background.
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);
}
Comment