Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » GridEditor issue
GridEditor issue [message #8489] Fri, 11 August 2006 10:10 Go to next message
remi is currently offline remiFriend
Messages: 9
Registered: July 2009
Junior Member
Hi,

just a little question about using GridEditor class in my program.

I write the following code:

final Grid grid = new Grid(top, SWT.BORDER);
grid.setLinesVisible (true);

for (int i=0; i<3; i++) {
GridColumn column = new GridColumn(grid,
SWT.NONE);
column.setWidth (100);
}
GridItem [] items = grid.getItems ();
for (int i=0; i<items.length; i++) {
GridEditor editor = new GridEditor (grid);
CCombo combo = new CCombo (grid, SWT.NONE);
combo.setText("CCombo");
combo.add("item 1");
combo.add("item 2");
editor.minimumWidth = 50;
//editor.grabHorizontal = true;

editor.setEditor(combo, items[i], 0);

editor = new GridEditor (grid);
Text text = new Text (grid, SWT.NONE);
text.setText("Text");
editor.grabHorizontal = true;
editor.setEditor(text, items[i], 1);

editor = new GridEditor (grid);
Button button = new Button (grid, SWT.CHECK);
button.pack ();
editor.minimumWidth = button.getSize ().x;
editor.horizontalAlignment = SWT.LEFT;
editor.setEditor (button, items[i], 2);
}

The goal is just to display a 12*3 nebula Grid with:
CCombo in column 1
Text in column 2
Button in column 3

This part of code is largely inspired from TableEditor creation javadoc
but the result is not the same as with the TableEditor:
The Grid is fullfilled with a signe big CCombo.... It seems that the combo
is inserted into Grid layout and overlaps any others Grid cells.

Could someone help?
Thanks in advance.
Re: GridEditor issue [message #8519 is a reply to message #8489] Fri, 11 August 2006 18:17 Go to previous messageGo to next message
Chris Gross is currently offline Chris GrossFriend
Messages: 253
Registered: July 2009
Senior Member
This is a bug. Can you please enter a bug in bugzilla:

http://bugs.eclipse.org

I'll fix it as soon as the bug is entered.

-Chris

remi wrote:
> Hi,
> just a little question about using GridEditor class in my program.
> I write the following code:
> final Grid grid = new Grid(top, SWT.BORDER);
> grid.setLinesVisible (true);
> for (int i=0; i<3; i++) {
> GridColumn column = new GridColumn(grid, SWT.NONE);
> column.setWidth (100); }
> GridItem [] items = grid.getItems (); for
> (int i=0; i<items.length; i++) { GridEditor
> editor = new GridEditor (grid); CCombo combo =
> new CCombo (grid, SWT.NONE);
> combo.setText("CCombo"); combo.add("item 1");
> combo.add("item 2");
> editor.minimumWidth = 50;
> //editor.grabHorizontal = true;
> editor.setEditor(combo, items[i], 0);
> editor = new GridEditor
> (grid); Text text = new Text (grid, SWT.NONE);
> text.setText("Text");
> editor.grabHorizontal = true;
> editor.setEditor(text, items[i], 1);
> editor = new GridEditor (grid);
> Button button = new Button (grid, SWT.CHECK);
> button.pack ();
> editor.minimumWidth = button.getSize ().x;
> editor.horizontalAlignment = SWT.LEFT;
> editor.setEditor (button, items[i], 2); }
> The goal is just to display a 12*3 nebula Grid with: CCombo in column 1
> Text in column 2 Button in column 3
> This part of code is largely inspired from TableEditor creation javadoc
> but the result is not the same as with the TableEditor: The Grid is
> fullfilled with a signe big CCombo.... It seems that the combo is
> inserted into Grid layout and overlaps any others Grid cells.
> Could someone help? Thanks in advance.
Re: GridEditor issue [message #8571 is a reply to message #8519] Mon, 14 August 2006 15:41 Go to previous message
remi is currently offline remiFriend
Messages: 9
Registered: July 2009
Junior Member
That's Ok now.
Fix is integrated and validated.

Many thanks for your reactivity
Re: GridEditor issue [message #563883 is a reply to message #8489] Fri, 11 August 2006 18:17 Go to previous message
Chris Gross is currently offline Chris GrossFriend
Messages: 471
Registered: July 2009
Senior Member
This is a bug. Can you please enter a bug in bugzilla:

http://bugs.eclipse.org

I'll fix it as soon as the bug is entered.

-Chris

remi wrote:
> Hi,
> just a little question about using GridEditor class in my program.
> I write the following code:
> final Grid grid = new Grid(top, SWT.BORDER);
> grid.setLinesVisible (true);
> for (int i=0; i<3; i++) {
> GridColumn column = new GridColumn(grid, SWT.NONE);
> column.setWidth (100); }
> GridItem [] items = grid.getItems (); for
> (int i=0; i<items.length; i++) { GridEditor
> editor = new GridEditor (grid); CCombo combo =
> new CCombo (grid, SWT.NONE);
> combo.setText("CCombo"); combo.add("item 1");
> combo.add("item 2");
> editor.minimumWidth = 50;
> //editor.grabHorizontal = true;
> editor.setEditor(combo, items[i], 0);
> editor = new GridEditor
> (grid); Text text = new Text (grid, SWT.NONE);
> text.setText("Text");
> editor.grabHorizontal = true;
> editor.setEditor(text, items[i], 1);
> editor = new GridEditor (grid);
> Button button = new Button (grid, SWT.CHECK);
> button.pack ();
> editor.minimumWidth = button.getSize ().x;
> editor.horizontalAlignment = SWT.LEFT;
> editor.setEditor (button, items[i], 2); }
> The goal is just to display a 12*3 nebula Grid with: CCombo in column 1
> Text in column 2 Button in column 3
> This part of code is largely inspired from TableEditor creation javadoc
> but the result is not the same as with the TableEditor: The Grid is
> fullfilled with a signe big CCombo.... It seems that the combo is
> inserted into Grid layout and overlaps any others Grid cells.
> Could someone help? Thanks in advance.
Re: GridEditor issue [message #563926 is a reply to message #8519] Mon, 14 August 2006 15:41 Go to previous message
remi is currently offline remiFriend
Messages: 9
Registered: July 2009
Junior Member
That's Ok now.
Fix is integrated and validated.

Many thanks for your reactivity
Previous Topic:column visibility
Next Topic:column visibility
Goto Forum:
  


Current Time: Fri Nov 21 02:47:21 GMT 2014

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

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