I'm trying to make a FlexTable have 0 padding/margin. That way I can
make rows visible/invisible without the user being able to tell
there's a space there. Unfortunately, it looks like FlexTable does
not respect the 0 padding/margin settings: When I make a row
invisible, you can see extra space between it and the rows above/below
it. This space grows every time you make a row disappear. Here is my
code:
public class MyModule implements EntryPoint {
public void onModuleLoad() {
final FlexTable table = new FlexTable();
for (int i = 0; i < 7; ++i) {
for (int j = 0; j < 3; ++j) {
table.setWidget(i, j, new Button("{" + i + ", " + j +
"}"));
}
}
table.setBorderWidth(0);
table.setCellPadding(0);
table.setCellSpacing(0);
RootPanel.get("slot1").add(table);
Button removeRow = new Button("remove row 1", new
ClickListener() {
private int row = 1;
public void onClick(Widget sender) {
for (int i = 0; i < 3; ++i) {
table.getCellFormatter().setVisible(row, i,
false);
}
row++;
}
});
RootPanel.get("slot2").add(removeRow);
}
}
You may notice there are 4 attempts here to set the FlexTable's
padding to 0. I've also tried setting the Widgets in the cell to
invisible instead of going through the table.getCellFormatter() and it
still has the same effect. I've tried using
table.getFlexCellFormatter().setVisible() instead with no luck. I'm
also using this CSS file:
* {
padding: 0;
margin: 0;
}
This also does not have any effect on the space problem. Note that I
am testing this in hosted mode. Has anyone solved this problem?
Thanks,
Dan
On 10/18/07, tieTYT <tie...@gmail.com> wrote:
>