How to resize GWT CheckBox

81 views
Skip to first unread message

mee...@gmail.com

unread,
Jul 16, 2007, 8:45:55 AM7/16/07
to Google Web Toolkit
Hi all, I try to resize checkbox to 10px in oder to fit my grid table
but it's not working.
Actually, I need GWT to generate <input type="checkbox"
style="width=10px"> but currently even in GWT1.4 it generates

<span class="gwt-CheckBox">
<input id="check3" type="checkbox"/>
<label for="check3"/>
</span>

which is not possible to make the checkbox reduce its size. does
anyone know how to resize the checkbox ?

Thank you so much in advance

Rob Coops

unread,
Jul 16, 2007, 8:54:30 AM7/16/07
to Google-We...@googlegroups.com
Of course you can all elements have a setStyleAttribute method this allows you to manualy specify the style attached to the element. Use the DOM to get the ellement and then use the ellement to set the attribute.
 
No code available from me as I am knee deep in writting reports right now and have no time to even write this email :-(
 
Rob

 

Ian Bambury

unread,
Jul 16, 2007, 9:02:45 AM7/16/07
to Google-We...@googlegroups.com
You can't actually resize the checkbox square, all you can do is play with negative padding (I think) and slide the top and left few pixels out of sight, then use height and width to hide the other edges.
 
Or make your own.
 

Ian
Reply all
Reply to author
Forward
0 new messages