Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] [SWT] Implement TextAreaCellEditor


Jack,

TextCellEditor is a JFace concept, not an SWT concept.

Within JFace it doesn't look like the TextAreaCellEditor concept is supported, but you could easily create your own by subclassing TextCellEditor.  

You would have to define the text widget for the editor as multiline and with scrollbars and you would have to override the return key behavior (currently pressing return ends the edit, in the multiline case you do not want this).  I did this by quickly hacking TextCellEditor.  First I changed the widget creation in createControl as follows:

        text = new Text(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);

And then I overrode the keyReleaseOccurred method so that it doesn't end the edit when Return is pressed.

There is probably a bugzilla feature request for this, but if not I will open one.



"Jack R." <radienssmgs2@xxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

10/22/2002 06:58 PM
Please respond to platform-swt-dev

       
        To:        <platform-swt-dev@xxxxxxxxxxx>
        cc:        
        Subject:        [platform-swt-dev] [SWT] Implement TextAreaCellEditor





Hi,

Can someone please tell me how to implement TextAreaCellEditor (where user
can enter mulitple line text, display scrollbar if necessary)?
I can only find TextCellEditor in SWT, but I want a cell editor for mulitple
line text editing.

Thank you.
[I post the same question in the news group, but I did not get any response]
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top