Bug 52953 - [CellEditors] Table cell editor alignment problem
Summary: [CellEditors] Table cell editor alignment problem
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-24 11:32 EST by Mitch Christensen CLA
Modified: 2019-09-06 15:35 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mitch Christensen CLA 2004-02-24 11:32:58 EST
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.
Comment 1 Grant Gayed CLA 2004-02-24 12:11:47 EST
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.
Comment 2 Veronika Irvine CLA 2004-02-24 13:11:23 EST
We addressed this for TableCursor but not TableEditor.  I will look at this.
Comment 3 Mitch Christensen CLA 2004-02-24 13:32:59 EST
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.
Comment 4 Steve Northover CLA 2007-03-31 10:46:53 EDT
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.
Comment 5 Thomas Schindl CLA 2007-03-31 12:48:55 EDT
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.
Comment 6 Steve Northover CLA 2007-03-31 14:53:26 EDT
Does the cell editor automatically create the text control?
Comment 7 Thomas Schindl CLA 2007-04-01 06:54:44 EDT
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).
Comment 8 Eclipse Webmaster CLA 2019-09-06 15:35:36 EDT
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.