|
Re: catch the "return" key [message #52941 is a reply to message #52860] |
Fri, 22 August 2008 13:08 |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
Aline wrote:
> Hi !
>
> I would like to catch the return key in the rich text tab of an
> RichTextEditor to insert a new line. For now, it just "simulates" the
> pressing of the [OK] button.
> I tried to add a keylistener to the RichTextEditor object but special
> keys such as return key or backspace key are not catched. I also tried
> to implements my class from KeyListener with no results.
>
> Does anyone have some ideas to fix this ?
If you're talking about placing a RichTextEditor in a JFace Dialog, then
the answer is to override
org.eclipse.jface.dialogs.Dialog.createButtonsForButtonBar(C omposite)
and change the way it creates the OK button (pass false as the final
argument to createButton() instead of true).
Hope this helps,
Eric
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05657 seconds