Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » GridEditor problem
GridEditor problem [message #564143] Thu, 24 August 2006 10:44
Eclipse User
Originally posted by: shilpa.pramati.com

Usage of GridEditor

private static final int NUM = 3;

final Grid grid = new Grid(shell,SWT.BORDER | SWT.V_SCROLL |
SWT.H_SCROLL);
grid.setHeaderVisible(true);

GridColumn column = null;
GridItem item = null;
GridEditor gridEditor = null;

//Create three columns
for (int i = 0; i < NUM; i++) {
column = new GridColumn(grid, SWT.LEFT);
column.setTree(true);
column.setText(headers[i]);
column.setWidth(100);
}

for (int i=0; i<NUM; i++) {
item = new GridItem(grid, SWT.NONE);
}

GridItem [] items = grid.getItems ();

for (int i=0; i<items.length; i++) {
GridEditor editor = new GridEditor(grid);
Text text = new Text(grid, SWT.NONE);
editor.grabHorizontal = true;
editor.setEditor(text,items[i],0);
editor.setEditor(text,items[i],1);
editor.setEditor(text,items[i],2);
}

I want all the columns of three rows to be editable ie have Text in column
But the above code gives a different result. The third column of the three
rows are editable ........

Can someone help ?

Thanks in advance
Shilpa
Previous Topic:Re: Blank view when implementing CTableTree
Next Topic:GridEditor problem
Goto Forum:
  


Current Time: Tue Oct 21 05:38:06 GMT 2014

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

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