Unwanted shrink of table columns [message #1083118] |
Fri, 09 August 2013 13:53 |
Gosia Stefan Messages: 2 Registered: August 2013 |
Junior Member |
|
|
Hi all.
I have a table:
Table table = new Table(myContainer, SWT.BORDER SWT.V_SCROLL);
table.setLinesVisible(true);
table.setSize(100, 100);
TableLayout tableLayout = new TableLayout();
tableLayout.addColumnData(new ColumnWeightData(30, false));
tableLayout.addColumnData(new ColumnWeightData(30, false));
tableLayout.addColumnData(new ColumnWeightData(40, false));
table.setLayout(tableLayout);
String[] tableNames = new String[] { "", "name1", "name2" };
for (int i = 0; i < tableNames.length; i++) {
TableColumn column = new TableColumn(table, SWT.NONE);
column.setText(tableNames[i]);
}
table.setHeaderVisible(true);
final TableColumn[] columns = table.getColumns();
Problem I have is that table columns are shrinking to the left if there is "SWT.V_SCROLL" in the table. If it is not there, then the columns are displayed properly. I have tried to set column.setResizible(false) , but it doesnt help. I need to have scroll bar.
Was wonder if you can help me.
Thank you
|
|
|
|
Powered by
FUDForum. Page generated in 0.02808 seconds