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 23:20 Go to next message
K S is currently offline K SFriend
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 19:32 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 298
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 19:59 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
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: Wed Dec 17 21:39:25 GMT 2014

Powered by FUDForum. Page generated in 0.14516 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software