Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » CTRL+Enter in a Textbox in a Wizard
CTRL+Enter in a Textbox in a Wizard [message #558713] Tue, 14 September 2010 07:53 Go to next message
Philipp Schill is currently offline Philipp SchillFriend
Messages: 11
Registered: July 2010
Junior Member
Hello,
how do I implement a SWT text with a keylistener of CTRL+ENTER which causes a wizard to call performFinish.
Example would be the comment textfield in a CVS or SVN commit dialog wiazard.
Thanks
phil

[Updated on: Tue, 14 September 2010 07:53]

Report message to a moderator

Re: CTRL+Enter in a Textbox in a Wizard [message #558959 is a reply to message #558713] Wed, 15 September 2010 07:02 Go to previous message
Lakshmi ShanmugamFriend
Messages: 275
Registered: July 2009
Location: India
Senior Member
Hi,

You can use the traverse listener to do this.
Here is an example:
text.addTraverseListener(new TraverseListener() {
              public void keyTraversed(TraverseEvent e) {
		  if ((e.detail == SWT.TRAVERSE_RETURN) && (e.stateMask == SWT.CTRL)) {
			e.doit = true;
		  }
	     }
});


HTH,


Lakshmi P Shanmugam
Previous Topic:Basic Radio button text color question
Next Topic:swt browser don't download and display images
Goto Forum:
  


Current Time: Mon Oct 23 15:32:21 GMT 2017

Powered by FUDForum. Page generated in 0.02093 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software