rhajamor / opal

Automatically exported from code.google.com/p/opal
2 stars 0 forks source link

OButton - Cannot focus on next control with TAB #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a window with 2 SWT buttons and 1 OButton.
2. Open this window and press TAB.
3. Keep pressing TAB. The navigation will end-up at the OButton.

What is the expected output? What do you see instead?
In this case, its expected the navigation to continue endless, and not to 
end-up on OButton.

What version of the product are you using? On what operating system?
0.9.5 on Windows 7

To solve this problem I used a KeyListener, like this:

button.addKeyListener( new KeyListener() {
    @Override
    public void keyReleased( KeyEvent e ) {
    }

    @Override
    public void keyPressed( KeyEvent e ) {
        if ( e.keyCode == SWT.TAB ) {
            if ( e.stateMask == SWT.SHIFT ) {
                button.traverse( SWT.TRAVERSE_TAB_PREVIOUS );
            } else {
                button.traverse( SWT.TRAVERSE_TAB_NEXT );
            }
        }
    }
} );

Original issue reported on code.google.com by jrp...@gmail.com on 28 Dec 2012 at 12:53

GoogleCodeExporter commented 9 years ago
Fixed in V

Original comment by laurent....@gmail.com on 16 Nov 2013 at 6:36