Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 15923 - [Cell Editors] passing the style to ComboBoxCellEditor
Summary: [Cell Editors] passing the style to ComboBoxCellEditor
Status: RESOLVED DUPLICATE of bug 12329
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Andrew Irvine CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 10687
  Show dependency tree
 
Reported: 2002-05-14 03:31 EDT by Yoav Rubin CLA
Modified: 2002-10-10 16:45 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yoav Rubin CLA 2002-05-14 03:31:08 EDT
Currently ComboBoxCellEditor doesn't have a constructor that receives the style for the created combo. 
The created combo doesn't have the style bit SWT.READ_ONLY, therefore the user may type a different value 
from the ones on the list. I'd like to force the user to select one of the items on the combo's list, and 
not type in a different one. Moreover, if the user does type a different value, an exception occures 
(because there wasn't any selection in the combo...)
Comment 1 Nick Edgar CLA 2002-05-14 10:56:55 EDT
Does the exception occur in your code or in ComboBoxCellEditor?
Comment 2 Nick Edgar CLA 2002-05-14 10:59:59 EDT
Should change all CellEditors to support user-specified style bits:
- add a constructor in CellEditor which takes the style bits and remembers them 
before calling createControl
- add a getStyle() method to CellEditor
- add constructors that take style in subclasses
- change current constructors in subclasses to call the new constructor with 
the default style
- change the createControl methods to use getStyle()
Comment 3 Nick Edgar CLA 2002-05-26 14:51:32 EDT
See also bug 10687.
Comment 4 Andrew Irvine CLA 2002-10-10 16:45:59 EDT

*** This bug has been marked as a duplicate of 12329 ***