Community
Participate
Working Groups
Build Identifier: I20090611-1540 I notice that if a column (e.g the last column) on a table with more than one columns contains a tableEditor (e.g with a Text control inside) and that column is resized using the left edge of the column (resizing using the right edge is fine) or if one of the previous columns is resized, then the tableEditor isn't redrow correctly Reproducible: Always Steps to Reproduce: 1. make a table with 2 columns 2. create a tableEditor on the second column with a Text control 3. enlarge the first column -> the textEditor doesn't move with the column
Created attachment 178268 [details] status before the column resize screenshot of the table before the column resizing
Created attachment 178269 [details] status after the column resizing status of the tabel after the column resizing. the tableEditor didn't redraw itself.
I can't reproduce it with 1.3 release or CVS HEAD. Looks like you are using 1.2 (20090611-1540). For me, when I click on the table header to enlarge the column, the active cell editor is automatically deactivated. Can you check it with 1.3 or CVS HEAD?
(In reply to comment #3) > I can't reproduce it with 1.3 release or CVS HEAD. Looks like you are using 1.2 > (20090611-1540). For me, when I click on the table header to enlarge the > column, the active cell editor is automatically deactivated. Can you check it > with 1.3 or CVS HEAD? I'm already using rap 1.3.0 the problem shows not when resizing the column with the cell editor, but when resizing the columns on its left.
Marco, as I can't reproduce it with Controls Demo -> TableViewer Tab, please provide a snippet for this issue with complete steps how to reproduce.
(In reply to comment #5) > Marco, as I can't reproduce it with Controls Demo -> TableViewer Tab, please > provide a snippet for this issue with complete steps how to reproduce. Thanks for the answer. I'm not using TableViewer, but directly the TableEditor in a table like in the exemple present on the eclipse documentation at: http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/custom/TableEditor.html this is the example present in the TableEditor javadoc (only added table.setHeaderVisible(true)): final Table table = new Table(shell, SWT.FULL_SELECTION | SWT.HIDE_SELECTION); TableColumn column1 = new TableColumn(table, SWT.NONE); TableColumn column2 = new TableColumn(table, SWT.NONE); table.setHeaderVisible(true); for (int i = 0; i < 10; i++) { TableItem item = new TableItem(table, SWT.NONE); item.setText(new String[] {"item " + i, "edit this value"}); } column1.pack(); column2.pack(); final TableEditor editor = new TableEditor(table); //The editor must have the same size as the cell and must //not be any smaller than 50 pixels. editor.horizontalAlignment = SWT.LEFT; editor.grabHorizontal = true; editor.minimumWidth = 50; // editing the second column final int EDITABLECOLUMN = 1; table.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { // Clean up any previous editor control Control oldEditor = editor.getEditor(); if (oldEditor != null) oldEditor.dispose(); // Identify the selected row TableItem item = (TableItem)e.item; if (item == null) return; // The control that will be the editor must be a child of the Table Text newEditor = new Text(table, SWT.NONE); newEditor.setText(item.getText(EDITABLECOLUMN)); newEditor.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { Text text = (Text)editor.getEditor(); editor.getItem().setText(EDITABLECOLUMN, text.getText()); } }); newEditor.selectAll(); newEditor.setFocus(); editor.setEditor(newEditor, item, EDITABLECOLUMN); } }); resizing column 1 , the editor on column2 (if visible) doesn't redraw correctly.
Now everything is in place... I can reproduce to problem. Thanks for the snippet.
Created attachment 178300 [details] Test case In RAP if a column is resized, the columns after it do not fire control move event.
(In reply to comment #8) Thanks Ivan. > Created an attachment (id=178300) [details] > Test case > > In RAP if a column is resized, the columns after it do not fire control move > event.
Fixed in CVS HEAD.