|
Actually, I have to take this back. There's no
viewer to allow this, but you should be able to do what you want directly using
the Table and TableEditor classes, and handling the mouse events yourself. There
is some sample code in the JavaDoc for the TableEditor class.
Stef
In short, you can't. The TableViewer only allows
for one cell editor per column. The PropertySheetViewer is closer in some
respects to what you want since you can have a unique cell editor per cell,
but it a) is not public, b) requires you provide IPropertySheetEntrys, c) only
supports two columns and d) only allows editing of the second column. But
other than that... ;-)
I had to create my own hybrid of these two to get
the behavior I needed. BTW, I also had to create my own
EditableComboBoxCellEditor to allow the user to type arbitrary text into
the field as well as select from a pre-defined list.
Stef
How
can I create a SWT table where each cell is editable? The cell editors can
be a text editior or a comboBox editor.
Anita
|