PDA

View Full Version : menu can not change background?



cabe
30 Mar 2009, 2:14 AM
I want to change the bacdground of the menu!

my code:

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.extjs.gxt.ui.client.widget.menu.Menu;
import com.extjs.gxt.ui.client.widget.button.Button;

public class TestMenuApp implements EntryPoint {
public void onModuleLoad() {
Menu m=new Menu();
m.addStyleName("test-menu"); //m.setStyleName("test-menu"); both method failed
m.setSize(300,300);

Button b=new Button("button");
b.setMenu(m);

RootPanel.get().add(b);
}
}

the css:

.test-menu{
background:#c3daf9 url(images/newMenu.jpg);
}


the result of code tell me nothing has been changed, what should I do if I want change css of the menu?