vellanr
26 Apr 2011, 12:40 PM
I created a simple GXT app that simply adds a new GXT window to the rootpanel.
The setStyleAttribute works when I include gxt-gray.css in the corresponding html file.
But now when I include the gxt-all.css, the new style does not work.
I inspected the elements using firebug and the style is there.
But does not seem to take effect.
Any help would be appreciated.
Code:
----------------------
package com.example.myproject.client;
import com.extjs.gxt.ui.client.widget.Window;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class TestWindow implements EntryPoint {
/**
* This is the entry point method.
*/
public void onModuleLoad() {
Window w = new Window();
w.setStyleAttribute("background-color", "red");
RootPanel.get().add(w);
}
}
-----------------------------
The setStyleAttribute works when I include gxt-gray.css in the corresponding html file.
But now when I include the gxt-all.css, the new style does not work.
I inspected the elements using firebug and the style is there.
But does not seem to take effect.
Any help would be appreciated.
Code:
----------------------
package com.example.myproject.client;
import com.extjs.gxt.ui.client.widget.Window;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class TestWindow implements EntryPoint {
/**
* This is the entry point method.
*/
public void onModuleLoad() {
Window w = new Window();
w.setStyleAttribute("background-color", "red");
RootPanel.get().add(w);
}
}
-----------------------------