Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » How to enable inline editing within a GridItem(Enable inline editing in a GridItem on "Enter" key press)
How to enable inline editing within a GridItem [message #1014963] Tue, 26 February 2013 18:20 Go to next message
K S is currently offline K S
Messages: 4
Registered: February 2013
Junior Member
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 #1015217 is a reply to message #1014963] Wed, 27 February 2013 14:32 Go to previous messageGo to next message
Wim Jongman is currently offline Wim Jongman
Messages: 275
Registered: July 2009
Senior Member

Hi K S,

did you take a look at the snippets?

http://www.eclipse.org/nebula/snippets.php#Grid

Best regards,

Wim
Re: How to enable inline editing within a GridItem [message #1015223 is a reply to message #1014963] Wed, 27 February 2013 14:59 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5257
Registered: July 2009
Senior Member
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!
>
Previous Topic:TreeModelViewer support for GridViewer
Next Topic:Gantt Chart: how can i configure context menu
Goto Forum:
  


Current Time: Thu Jul 31 01:42:37 EDT 2014

Powered by FUDForum. Page generated in 0.01465 seconds