| first table column no alignment [message #457161] |
Mon, 20 June 2005 08:55  |
|
Originally posted by: elbucho.gmx.de
Hello,
there seems to be a strange problem.
The following code sets center alignment to all columns except(!) the first
one. I can't even imagine why this happens.
Aligning it to the right doesn't work either. The first column is always
left aligned. Can you change this behaviour ?
Thanks
Roland
---------
Display display = new Display();
Shell shell = new Shell(display);
GridLayout layout = new GridLayout();
layout.numColumns = 1;
shell.setLayout(layout);
Table table = new Table(shell, SWT.SINGLE | SWT.BORDER);
table.setLinesVisible(true);
table.setHeaderVisible(true);
TableColumn[] columns = new TableColumn[10];
for (int i = 0; i < 10; i++)
{
columns[i] = new TableColumn(table, SWT.CENTER);
columns[i].setText("I"+i);
columns[i].setWidth(50);
columns[i].setResizable(true);
}
shell.open();
while ( ! shell.isDisposed())
{
if ( ! display.readAndDispatch())
display.sleep();
}
display.dispose();
}
-------------
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01942 seconds