Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I catch the CTRL_C or CTRL_V event

 
yu yong
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear everyone.
How can I catch the Ctrl_C or Ctrl_V event in the StyledText widget.
Which event listener should I use. KeyListener or anyone else.
Thanks.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by yu yong:
How can I catch the Ctrl_C or Ctrl_V event in the StyledText widget.
Which event listener should I use. KeyListener or anyone else.


Hm, sorry for my ignorance, but what is a StyledText widget? If it's part of the Swing standard jcomponents, then your best bet may be to use Key Bindings. There's a decent tutorial on this at the Sun Java tutorials. HTH.
 
yu yong
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I dont describe my question in detail.
My project is a rcp project besides swt widgets. All the swt widgets should be run on the a viewpart ui or a dialog widget which belong among the rcp.
 
Andy Selador
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're running from the command line, there may be some issues, but here is a link that may help.

http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/msg27323.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic