[Grid] ComboBoxCellEditor doesn't return focus to the Grid [message #592379] |
Sat, 27 September 2008 23:03 |
Gregory Dyke Messages: 8 Registered: July 2009 |
Junior Member |
|
|
This time I think I'm on a "real" problem.
I have two kinds of celleditors which I use in my Grid:
- TextCellEditor
- ComboBoxCellEditor
I'm currently implementing keyboard only input. The eclipse 3.3 editing
support stuff is very nice. When I validated/cancel a TextCellEditor
(through ret/esc) focus is returned to the cell and it has a thick black
rectangle around it indicating selection. I can then move to the next cell
with the arrow keys.
When I validate/cancel a ComboBoxCellEditor, the combobox disappears and
the cell appears to be back to normal, but the selection rectangle is
thin. The grid appears to no longer have keyboard focus.
I really don't understand GUI programming very well. I notice that
ComboBoxCellEditor has this snippet:
comboBox.addTraverseListener(new TraverseListener() {
public void keyTraversed(TraverseEvent e) {
if (e.detail == SWT.TRAVERSE_ESCAPE
|| e.detail == SWT.TRAVERSE_RETURN) {
e.doit = false;
}
}
});
Might this e.doit = false; be the culprit? What is this code there for? If
I understand correctly, it prevents the event from bubbling up?
Regards
Greg
|
|
|
Powered by
FUDForum. Page generated in 0.03110 seconds