[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Wizard buttons always receive key 'Enter' event

        text.addTraverseListener(new TraverseListener() {
                public void keyTraversed(TraverseEvent e) {
                        if (e.detail == SWT.TRAVERSE_RETURN) {
                                e.doit = false;
                        }
                }
        });



> I have a wizard with one page, in the page I have an entry field and a
> table.
> I have added a keyListener to the entry field so that when the user
> press enter, I want to add the text to a table ( this is an expected
> behavior).
>
> But instead of that, the Finish button get the event first and the 
dialog
> finishes. This is a very annoying problem because the wizard finishes
> unexpectedly
>
> Can I do something to get the Enter event before the wizard buttons?
> 
> Thank you
> Valentina