Data point drag tool - how to fire event after using the arrow keys, or turn them off


Data point drag tool - how to fire event after using the arrow keys,...
Author
Message
Kevin Harrison 1
Kevin Harrison 1
Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)
Group: Forum Members
Posts: 176, Visits: 1.9K
Hi

I have successfully attached an event to NDataPointDragTool.EndDrag, but this does not fire if I use Ctrl + arrow keys to move the data points. How do I do this? Also, it would be useful to know how to turn off the Ctrl + arrow key movement completely.

By the way, the link to NDataPointDragTool in the installed help file is broken.

Thanks

Kevin
Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Kevin,
You can use the DragLeftShortcut, DragRightShortcut, DragUpShortcut and DragDownShortcut properties to disable moving the data point in particular direction - for example:
dataPointDragTool.DragLeftShortcut = new NShortcut();
Unfortunately there is no data point moved event (we'll add one) but for the time being you can inherit from the NDataPointDragTool and override the OnKeyDown method:

 class MyDataPointDragTool : NDataPointDragTool
 {
  public override void OnKeyDown(object sender, NKeyEventArgs e)
  {
   base.OnKeyDown(sender, e);

   if (e.Handled)
   {
    // the data point was moved
   }
  }
 }

Hope this helps - let us know if you meet any problems or have any questions.


Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search