GridEditor issue [message #8489] |
Fri, 11 August 2006 06:10  |
Eclipse User |
|
|
|
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 14:17   |
Eclipse User |
|
|
|
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 #563883 is a reply to message #8489] |
Fri, 11 August 2006 14:17  |
Eclipse User |
|
|
|
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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02489 seconds