[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Replace the behaviour of the enter key to the tab key in a TitleAreaDialog

You need to add a Traverse listener to the Text (see SWT.Traverse example
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet127.java?view=co )
, and if it detects a SWT.TRAVERSE_RETURN, it should set event.doit=false
(to prevent the default button from being activated) and move focus to the
next field.

Grant


"Nuno" <nuno.esculcas@xxxxxxxxx> wrote in message
news:fi4b2k$f67$1@xxxxxxxxxxxxxxxxxxxx
> Hi,
>
> In my TitleAreaDialog if the user hits <Tab> ket the focus is moved to
> the next box, if the User hits <Return> key the TitleAreaDialog performs
> the ok process and returns focus back to the previous screen/window.
>
> Is possible to change the behavior of the <Return> key to function in
> the same manner as <Tab> key? How?
>
> Thanks