Community
Participate
Working Groups
This is an accessibility issue. A Button that is a toggle button with an image does not show any feedback when it is selected when using the tab key to navigate through controls. This works fine for push buttons with an image and for toggle buttons with text. Here is a snippit to show the problem: public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new RowLayout()); Image image = new Image(display, 20, 20); Color color = display.getSystemColor(SWT.COLOR_BLUE); GC gc = new GC(image); gc.setBackground(color); gc.fillRectangle(image.getBounds()); gc.dispose(); Composite c1 = new Composite(shell, SWT.BORDER); c1.setLayout(new RowLayout()); Button b1 = new Button(c1, SWT.PUSH); b1.setImage(image); Button b2 = new Button(c1, SWT.TOGGLE); b2.setImage(image); Button b3 = new Button(c1, SWT.TOGGLE); b3.setText("B3"); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
See also bug 153099.
*** This bug has been marked as a duplicate of 153099 ***