Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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: Sat Jun 21 05:07:00 EDT 2025

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

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

Back to the top