user1169587
user1169587

Reputation: 1336

How to modify the button width and height in ActionCell of GWT

the button is automatically generated by the ActionCell in gwt, I want to change the width and height of the generated button, any method?
I chekced the ActionCell has no any addStyleName to allow me to change the css of the button.

Upvotes: 2

Views: 1302

Answers (1)

Andrei Volgin
Andrei Volgin

Reputation: 41089

You have several options.

If you use this cell in a CellTable or DataGrid, set the style on a column which is built using ActionCell:

myColumn.setCellStyleNames("myButtonStyle");

You can also set this style on the parent element which includes ActionCell:

.myButtonStyle button {
    background: red;
}

or, even more specific, if necessary:

.myButtonStyle td button {
    background: red;
}

Upvotes: 4

Related Questions