View Full Version : Button and Stylesheet

7 Jul 2009, 10:04 PM
GXT 2.0
Browser: Firefox

The Style for the Button doesn't work.

Here is the Code :

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

* Entry point classes define <code>onModuleLoad()</code>.
public class Test implements EntryPoint {

public void onModuleLoad() {
Button bTest=new Button("Test");
}and the CSS:

.myButton {
background-image: none;
background-color: white;
color : black;
border : none;

.myButton:hover {
background-image: none;
Analysation with fireBug

<table id="x-auto-0" class="x-btn mybutton x-btn-noicon" cellspacing="0" role="presentation" style="width: auto;"><tbody class="x-btn-small x-btn-icon-small-left">

<td class="x-btn-ml">

<td class="x-btn-mc">
<em class="" unselectable="on">
<button class="x-btn-text" type="button" tabindex="0" style="position: relative;">Test</button>



<td class="x-btn-mr">




The Style is in the Table-Tag, I expected in in the Button-Tag

Is this a Bug or did i make a mistake ?

8 Jul 2009, 12:42 AM
The style gets assigned, so why this is a bug? It gets assigned to the buttoncomponent element, so this is correct