PDA

View Full Version : Change the button style in grid



the.wizard
3 Feb 2012, 2:13 AM
Hi everyone,
I need help to change the button style in grid. Currently the button look like this :
http://www.freeimagehosting.net/newuploads/utb8x.jpg
I want to resize the button so it will fit more properly in my grid like this :
http://www.freeimagehosting.net/newuploads/d1zu8.jpg
Please kindly advice me, I really frustrated with this problem.
Thanks.

Regards,
the.wizard

dhruv88esh
6 Feb 2012, 12:43 AM
Use CSS to change the size of image/button.

the.wizard
6 Feb 2012, 2:04 AM
Use CSS to change the size of image/button.
How to do it? I have tried to change the css with setStyleAttribute, but it is still like that. Please post more detail about the css.
Thanks.

dhruv88esh
6 Feb 2012, 4:20 AM
use CSS to that button/Image like:


.gridCellButton{
padding-top: 1px !important;
padding-bottom: 1px !important;
height: 2px !important;
width: 2px !important;
}


Note: Set the values in css a/c to your requirement.

Then set this css to button using :


button.setStyleName("gridCellButton");


Hope this will help you for sure.