Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Event on a Table row- ( S W T ).  RSS feed

 
Dave Jones
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there young ranchers .....
I have a nice working GUI with a few Tables on it, and now I was asked to add the option of a window opening( and doing something) when the user double clickes on a (any) row in the table.
now, does any body know the addSelectionListener method well enough to explain to me how to use it correctly .
Thanks a lot !.
 
dave taubler
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do I understand from your post title that you are using SWT? Or are you interested in help with a Swing JTable? I've done what you're interested in via a Swing JTable, but I can't help out with SWT...
 
Dave Jones
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I am using SWT and the question is addressed to SWT
 
Jeff Calusinski
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
// _tbv is the table.
_tbv.addDoubleClickListener(new IDoubleClickListener(){
public void doubleClick(DoubleClickEvent event){
IStructuredSelection selection =
(IStructuredSelection) event.getSelection();
}
});


Hope this helps.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!