Table gridlines & headers misaligned [message #460816] |
Thu, 08 September 2005 05:05 |
Eric Adamson Messages: 5 Registered: July 2009 |
Junior Member |
|
|
Developing with Win2K, SWT 3.1 (swt-win32-3138.dll), Table gridlines do not
align correctly with column headers. That is, vertical gridlines do not
align with the black grid that surrounds header "buttons". Rather, they
appear to be shifted one pixel to the right, aligning with the button
highlight. This is probably a strictly cosmetic issue, but it creates a
jarring visual effect.
I could not find this listed with Bugzilla, but wanted to check with others
before submitting a bug report. I'm still relatively new to SWT, and wanted
to make sure I'm not overlooking a property setting. (Test source appears
below.)
Thanks,
Eric Adamson
Lansing, MI
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.graphics.*;
public class TableGridlines {
public static void main(String[] args) {
Display d = new Display();
Shell s = new Shell(d);
s.setBounds(200, 200, 500, 300);
s.setText("SWT-Win32 Table Gridlines \"Bug\"");
s.open();
Rectangle r = s.getClientArea();
Table t = new Table(s, SWT.BORDER);
t.setBounds(15, 15, r.width-30, r.height-30);
t.setLinesVisible(true);
t.setHeaderVisible(true);
for (int i=0; i<6; i++) {
TableColumn tc = new TableColumn(t, SWT.CENTER);
tc.setText("Column " + (i+1));
tc.setWidth(t.getClientArea().width/6);
}
while (!d.isDisposed()) {
if (!d.readAndDispatch()) {
d.sleep();
}
}
d.dispose();
}
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04004 seconds