We have righ-justified a table column in order to accept numeric data (so
the decimal points align). Unfortunately, when the cell is activated for
editing, the cell editor is always left-justified. This results in
strange looking behavior. The cell contents shift left during editing,
and shift right again when you hit return.
Obviously, what I'd like is to have the cell-editor inherit the alignment
of the underlying cell.
I thought that I heard recently that this problem had been fixed in M7,
but I can't find any reference to this bug in Bugzilla, or anyplace else
for that matter.
I ran into the same problem and didn't find any answers in the forums. I did discover a solution that I will post here for someone else that runs into this issue. The TextCellEditor uses a Text field to edit the value. Setting the orientation of this Text field to SWT.RIGHT_TO_LEFT will cause the values to be displayed from right to left. Here is a snippet of code that I used to resolve this problem. Thanks.
class RightAlignTextEditor extends TextCellEditor
public RightAlignTextEditor( Composite comp )
super( comp );
public Control getControl()
Text text = (Text)super.getControl();
text.setOrientation( SWT.RIGHT_TO_LEFT );