Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Grid SetColumnOrder
Grid SetColumnOrder [message #589360] Fri, 18 April 2008 19:43
Lei is currently offline LeiFriend
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?
Previous Topic:Disposing of items in the Gallery
Next Topic:Nested Column Groups
Goto Forum:
  


Current Time: Fri Apr 26 00:45:21 GMT 2024

Powered by FUDForum. Page generated in 0.02894 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top