How to enable inline editing within a GridItem [message #1014963] |
Tue, 26 February 2013 18:20  |
Eclipse User |
|
|
|
Hello,
We are currently trying to enable inline editing within a GridItem on key press events.
For example, once the user has selected/focus on a GridItem, when the "Enter" key is pressed we want to enable inline editing and display the cursor within the GridItem.
So far we have added a Listener for the KeyDown event
import org.eclipse.nebula.widgets.grid.Grid;
public Grid theGrid;
theGrid = new Grid(parent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
theGrid.addListener(SWT.KeyDown, editListener);
We have an EditListener class that implements Listener and we have override the handleEvent method where we are currently listening for the Enter key event. We are able to capture the event here but are unable to enable the cursor for inline editing.
Can anyone provide some ideas to help us move forward? We are relatively new to using the Nebula grid. Thanks in advance!
|
|
|
|
Re: How to enable inline editing within a GridItem [message #1015223 is a reply to message #1014963] |
Wed, 27 February 2013 14:59  |
Eclipse User |
|
|
|
See of the JFace-Viewer implements it or better use the GridViewer?
Tom
Am 27.02.13 20:29, schrieb K S:
> Hello,
>
> We are currently trying to enable inline editing within a GridItem on
> key press events.
>
> For example, once the user has selected/focus on a GridItem, when the
> "Enter" key is pressed we want to enable inline editing and display the
> cursor within the GridItem.
>
> So far we have added a Listener for the KeyDown event
>
> import org.eclipse.nebula.widgets.grid.Grid;
>
> public Grid theGrid;
> theGrid = new Grid(parent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
> theGrid.addListener(SWT.KeyDown, editListener);
>
> We have an EditListener class that implements Listener and we have
> override the handleEvent method where we are currently listening for the
> Enter key event. We are able to capture the event here but are unable to
> enable the cursor for inline editing.
>
> Can anyone provide some ideas to help us move forward? We are relatively
> new to using the Nebula grid. Thanks in advance!
>
|
|
|
Powered by
FUDForum. Page generated in 0.02764 seconds