Grid SetColumnOrder [message #51681] |
Fri, 18 April 2008 19:43 |
Lei Messages: 23 Registered: July 2009 |
Junior Member |
|
|
it looks like there's a bug in the Grid.setColumnOrder() where an
IllegalArgumentException is thrown when passing a valid order sequence.
here's the code snippet:
public static void main(final String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
final Grid grid = new Grid(shell, SWT.FULL_SELECTION | SWT.V_SCROLL |
SWT.H_SCROLL | SWT.BORDER);
final GridColumnGroup group1 = new GridColumnGroup(grid, SWT.TOGGLE);
final GridColumnGroup group2 = new GridColumnGroup(grid, SWT.TOGGLE);
final GridColumnGroup group3 = new GridColumnGroup(grid, SWT.TOGGLE);
new GridColumn(group1, SWT.NONE);
new GridColumn(group2, SWT.NONE);
new GridColumn(group3, SWT.NONE);
grid.setColumnOrder(new int[] { 0, 1, 2 });
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
can someone confirm this?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03989 seconds