Community
Participate
Working Groups
When editing the contents of a cell, the cell editor is always left justified in the cell. If the table column is set for center or right justification, this causes very strange looking behavior as the cell contents 'jumps' left during editing, and then 'jumps' back to either it's center or right justified (i.e. normal) position when the cell loses focus. The cell editor should obey the column's content justification setting.
VI I think I've seen this reported before, but I can't find the report. If you already have one then mark this as a dup.
We addressed this for TableCursor but not TableEditor. I will look at this.
Is there a reason not to integrate the TableCursor and the TableViewer? I understand that this is probably more of a question for the TableViewer folks, but an integrated solution does seem to make sense. It would be nice to have changes applied to the TableCursor automatically apply to the TableEditor.
Since we have no idea which control is in the TableEditor, we don't know how it should be justified. For example, if the control in the TableEditor is a Text control and the column is right aligned, then it is up to the programmer to create the Text control with the proper alignment. Moving to UI since they have editors that are based on TableEditor that might be able to do this automatically.
Steve I think we can't do anything against this because our cell-editors are always filling the whole space and what we need to make this dynamically is to change the alignment of the the control dynamically something like Text#setAlignment(). The other possibility is that the user creates the cell-editor with SWT.RIGHT.
Does the cell editor automatically create the text control?
Yes. If you take e.g. a TextCellEditor it creates the control in its constructor and the control is reused whenever a editor is shown. If users would create one CellEditor per Table/TreeColumn there wouldn't be a problem because a he/she knows the style of the Table/TreeColumn and can create an editor with the style of SWT.RIGHT/SWT.LEFT/... . But we don't force people to do so they can use one TextCellEditor for all editable columns in a table/tree and then we would need the possibility to change the text alignment with something like Text#setAlignment(int).
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.