GWT. How to change flex table's column width?

7.7k views Asked by At

I can't change width of first column with CheckBoxes in my FlexTable. first column is very wide

I tried to use

filterGrid.getColumnFormatter().setWidth(0, "15px");

but it hadn't any effect.

Please suggest me something.

Appendix 1.

<table class="content" aria-hidden="false">
<colgroup><col width="10px"></col></colgroup>
<tbody>
<tr>
<td>
<span class="gwt-CheckBox" style="width: 1em;">
<input id="gwt-uid-9" type="checkbox" value="on" tabindex="0"></input>
<label for="gwt-uid-9"></label></span>
</td>
1

There are 1 answers

5
Churro On

Try FlexTable.getColumnFormatter().setWidth(column, width);

For example, I just tried table.getColumnFormatter().setWidth(0, "400px");

and that generated the following HTML:

<colgroup>
    <col width="400px">
</colgroup>

enter image description here