| Summary: | [Custom Widgets] READ_ONLY CCombo does not de-select text on FocusOut | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | karl.weber99 |
| Component: | SWT | Assignee: | Ian Pun <ipun> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ericwill, ipun, karl.weber99, lshanmug, lufimtse, pinnamur, Silenio_Quarti |
| Version: | 4.8 | Keywords: | triaged |
| Target Milestone: | 4.8 M2 | ||
| Hardware: | PC | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/100078 https://git.eclipse.org/r/102816 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=a70bf22ca177056eed1efc3b4dc7517117954b95 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=9d1e2228537739092cbe86deec0fa218488dd335 |
||
| Whiteboard: | |||
|
Description
karl.weber99
I fooled around a little more with CCombo and got a behaviour that I consider quite decent in eclipse.forms on linux after applying the following changes: (1) Add the event type SWT.FocusOut to comboEvents in the constructor. (2) In comboEvent(Event event) add to the switch: case SWT.FocusOut: text.clearSelection(); break; (3) Replace all _unconditional_ text.selectAll() with if (text.getEditable() && text.isFocusControl()) text.selectAll (); Note, that there is only one _conditional_ text.selectAll() -- in handleFocus. I left this unchanged. Nr. (2) is necessary because any Text control does not clearSelection() if it looses the focus. I consider this a bug of the Text control on linux. Maybe this will help you to improve CCombo on linux. New Gerrit change created: https://git.eclipse.org/r/100078 I've included the fix recommended by karl.weber99@gmx.net. However, this "improvement" should be discussed on why text selection was automatically selected in the first place for READ_ONLY. I'd like a bit of discussion before we decide whether or not to merge it. New Gerrit change created: https://git.eclipse.org/r/102816 Gerrit change https://git.eclipse.org/r/102816 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=a70bf22ca177056eed1efc3b4dc7517117954b95 Gerrit change https://git.eclipse.org/r/100078 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=9d1e2228537739092cbe86deec0fa218488dd335 Merged. @Carolyn, it would be great if you could verify against newest master or against tomorrow's build. Remove carolyn as she does not work for Eclipse anymore. changes have been merged. Resolved as fixed. |