| Summary: | Combo does not show focus ring in some cases | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Felipe Heidrich <eclipse.felipe> |
| Component: | SWT | Assignee: | Felipe Heidrich <eclipse.felipe> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, Silenio_Quarti |
| Version: | 4.2 | ||
| Target Milestone: | 3.8 M6 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Note that redrawing the combo (either by entering/exit the combo or using F1 in the snippet) will cause the combo to render correctly (showing the focus ring). Verified in N20120201-2112 that it works when I press 'Alt'. |
steps to reproduce the problem on Eclipse: "when hovering over a Java problem, you can enrich the hover and then click on the 'Configure Problem Severity' icon. This opens the preference page and sets the focus on the correct preference" The focus control is not decorated with focus ring, even when the ALT key is pressed. Thus, it can't be identified in the UI. Here is snippet that shows the same problem: public class Snippet { public static void main(final String[] args) { final Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new RowLayout()); Label label = new Label(shell, SWT.SINGLE); label.setText("text:"); final Combo combo = new Combo(shell, SWT.DROP_DOWN | SWT.READ_ONLY); combo.setItems(new String[] {"hello", "hi"}); combo.select(0); Button button = new Button(shell, SWT.PUSH); button.setText("button"); display.addFilter(SWT.KeyDown, new Listener() { public void handleEvent(Event event) { if (event.keyCode == SWT.F1) { combo.redraw(); System.out.println("redrawing"); } } }); shell.setSize(200, 200); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }