Bug 20430 - [Cell Editors] DialogCellEditor in the PropertySheet bases its width on its text rather than its cell's width
Summary: [Cell Editors] DialogCellEditor in the PropertySheet bases its width on its t...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Randy Giffen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 21829
Blocks:
  Show dependency tree
 
Reported: 2002-06-17 06:42 EDT by Joe Winchester CLA
Modified: 2002-08-22 11:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Winchester CLA 2002-06-17 06:42:09 EDT
In the PropertySheetViewer we have properties that have DialogCellEditor and 
ComboCellEditor editors.  With both of these the user will click the cell editor 
and then needs ot use the open dialog button or drop down combo button.  The 
editor is created with the width of the contents ( for the combo editor this is 
the widest strings in the list of strings ) and the button is on the right of 
this.  The problem our users have is that we have labels that are wider than the 
width of the values column and they click in the column and can't see the open 
/ drop down editor button.  Sometimes even scrolling doesn't bring it into view 
( maybe a separate problem here to do with the size of the horizontal scroll bar 
) and the only way of getting the button to become visible is to resize the 
whole property sheet to make the values column larger.  
I would expect that the editor width would just be the width of the values 
column so the button is always in view.
Comment 1 Randy Giffen CLA 2002-07-23 12:02:05 EDT
There are two competing interests here:

1) The combo cell editor should use the width of its column so its button is 
always visible.
2) The editor must be wide enough for the items in its list.

Currently the editor is sized to the widest item in its list (minimum 30).

Given that 1) is the desired behavior we could:

a) change the horizontal alignment of the cell editor to SWT.RIGHT. This will 
cause the button to always be aligned with the right hand column and the text 
to expand to the left as required for the longest item in the list. This looks 
a little weird as the text for the editor does not cleanly overlap the text 
for the property sheet value.

b) Ask for api on CCombo to cause the list to always use its preferred width. 
It's a bit weird to see a combo with its list wider than its button and label,

c) Make the changes for 1) only. The user can resize the column if the combo 
list is too narrow. 

My prefered solution is b)
Comment 2 Randy Giffen CLA 2002-07-23 16:00:13 EDT
Filed 21829 to get new CCombo api from SWT
Comment 3 Randy Giffen CLA 2002-08-12 16:13:05 EDT
Rereading the PR you state that the problem is with both DialogCellEditor and 
ComboCellEditor. I have not been able to recreate it with DialogCellEditor. 
The button is always visible regardless of the text label with. Can you verify 
that the problem in is only with ComboCellEditor in 2.0
Comment 4 Randy Giffen CLA 2002-08-13 12:51:37 EDT
Changed ComboBoxCellEditor
The editor opens with the width of the column to a min of 50 pixels.
Steve is releasing a change to CCombo to ensure that the list will appear with 
the required width.
Released to R2_0_1 and HEAD
Comment 5 Randy Giffen CLA 2002-08-13 15:52:37 EDT
SWT changes also released