I've noticed that calling setShouldPrint(false) into a field changes alignment of another.
Using SmartGWT 2.4, you can check that by creating a listgrid with the following fields
If I try to print this grid, with Canvas.showPrintPreview, I get field "campoItemToc" aligned to left. But if I call
after the code above, and try to print the grid again, the field "campoItemToc" appears right aligned in the print preview.
I checked with firebug and in fact, after a call to setShouldPrint(false) in campoSelecionado, the ''align'' attribute of each cell corresponding to "campoItemToc" field is changed from
to
Is it really a bug or is there any way I can solve that? I tried to call setAlign and setCellAlign to keep "campoItemToc" aligned to left, without success.
The following attachments show the canvas preview windows when all three fields are printable (align_left1.png) and after I call campoSelecionado.setShouldPrint(false) (align_right1.png)
Thanks,
Matheus
Using SmartGWT 2.4, you can check that by creating a listgrid with the following fields
Code:
ListGridField camposGrid[] = new ListGridField[4]; ListGridField campoNumero = new ListGridField("num", "Número", 70); campoNumero.setAlign(Alignment.RIGHT); ListGridField campoDocn = new ListGridField("docn", "DOCN", 100); campoDocn.setHidden(true); ListGridField campoItemToc = new ListGridField("itemToc", "Documento"); //campoItemToc.setAlign(Alignment.LEFT); //campoItemToc.setCellAlign(Alignment.LEFT); ListGridField campoSelecionado = new ListGridField("selecionado", " "); campoSelecionado.setCanEdit(true); campoSelecionado.setCanToggle(true); campoSelecionado.setType(ListGridFieldType.BOOLEAN); campoSelecionado.setWidth("50");
Code:
campoSelecionado.setShouldPrint(false);
I checked with firebug and in fact, after a call to setShouldPrint(false) in campoSelecionado, the ''align'' attribute of each cell corresponding to "campoItemToc" field is changed from
Code:
<td class="cell" align="left" style="overflow: hidden; height: 22px;">PL. 106 1999 PROPOSIÇÃO </td>
Code:
<td class="cell" align="right" style="overflow: hidden; height: 22px;">PL. 106 1999 PROPOSIÇÃO </td>
The following attachments show the canvas preview windows when all three fields are printable (align_left1.png) and after I call campoSelecionado.setShouldPrint(false) (align_right1.png)
Thanks,
Matheus
Comment