multi line DirectEditManager [message #16055] |
Tue, 30 July 2002 11:56  |
Eclipse User |
|
|
|
Hi
i have an editpart which is similar to the Label in the logic example,
i.e., the user can write text within in, and the text editor gets resized
according to the text included within it. i was wandering if it possible
to make a multiline label, i.e, if the user presses the 'Enter' key then a
new line is created. i tried to do it by creating my own cell editor ,
which is similar to the one in Jface, but the text has an SWT.MULTI flag,
and removed all the uses there of the 'Return' key. it ended up with a
single line label that when the uses presses 'Return', nothing happends.
do i need to override any of the GEF classes as well to allow such action?
thanks
yoav
|
|
|
Re: multi line DirectEditManager [message #16072 is a reply to message #16055] |
Tue, 30 July 2002 13:12  |
Eclipse User |
|
|
|
Originally posted by: hudsonr.spam.com
Enter is sent to the Text control. GEF does not interfere with KeyEvents
sent to widgets other than it's Canvas. If for some reason you have Enter
associated with a menu item, it will get consumed there.
Try creating the CellEditor or just the Text control in isolation without
GEF, and make sure Enter works there.
"Yoav Rubin" <yoav@il.ibm.com> wrote in message
news:ai6cvb$evc$1@rogue.oti.com...
> Hi
> i have an editpart which is similar to the Label in the logic example,
> i.e., the user can write text within in, and the text editor gets resized
> according to the text included within it. i was wandering if it possible
> to make a multiline label, i.e, if the user presses the 'Enter' key then a
> new line is created. i tried to do it by creating my own cell editor ,
> which is similar to the one in Jface, but the text has an SWT.MULTI flag,
> and removed all the uses there of the 'Return' key. it ended up with a
> single line label that when the uses presses 'Return', nothing happends.
> do i need to override any of the GEF classes as well to allow such action?
> thanks
> yoav
>
|
|
|
Powered by
FUDForum. Page generated in 0.03669 seconds