Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » TableViewer: 'Enter' key default behaviour?
icon5.gif  TableViewer: 'Enter' key default behaviour? [message #632426] Tue, 12 October 2010 20:36 Go to next message
Craig Foote is currently offline Craig FooteFriend
Messages: 217
Registered: July 2009
Senior Member
What is (and determines) the default behaviour when the user selects a row in a TableViewer and then presses the 'Enter' key? How can this be changed?

Craig
Re: TableViewer: 'Enter' key default behaviour? [message #637892 is a reply to message #632426] Tue, 09 November 2010 09:40 Go to previous messageGo to next message
T. Wilhelm is currently offline T. WilhelmFriend
Messages: 129
Registered: July 2009
Senior Member
Hi Craig,

i´m not sure if i got your problem, why don´t you simply add a KeyListener to the tree and then implement your own behavior (i.e. edit the first element in the row) ?

Greetz
Thomas
Re: TableViewer: 'Enter' key default behaviour? [message #637928 is a reply to message #637892] Tue, 09 November 2010 11:42 Go to previous messageGo to next message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad BandaruFriend
Messages: 100
Registered: March 2010
Location: Hyderabad
Senior Member

Even by adding a double click listener to the viewer you can do the same thing.
A double click event will be fired when enter key is pressed .
See this method and its usages for reference org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelec t(SelectionEvent)


Re: TableViewer: 'Enter' key default behaviour? [message #638117 is a reply to message #637928] Wed, 10 November 2010 00:39 Go to previous message
Craig Foote is currently offline Craig FooteFriend
Messages: 217
Registered: July 2009
Senior Member
Sorry, I probably should have provided more info. We do have a double-click listener on the table - I didn't realize it was being fired when the Enter key was pressed. Mystery solved, thanks.

Craig
Previous Topic:Binding the n-th element of a list
Next Topic:[DataBinding] TableViewer - ViewerSupport: render converted text or image
Goto Forum:
  


Current Time: Thu Apr 18 02:16:02 GMT 2024

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

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

Back to the top