<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Jeff,<div class=""><br class=""></div><div class="">So if I want my left button to select the point underneath it (I think the right button by default creates a box and selects points within that box but then does nothing with them…) and then, for example, print the information pertaining to that point, how would I go about that?</div><div class=""><br class=""></div><div class="">SetButtonToAction(vtkChartXY::SELECT, vtkContextMouseEvent::LEFT_MOUSE);</div><div class=""><br class=""></div><div class="">Do I then set up an observer for vtkChartXY::SELECT?</div><div class=""><br class=""></div><div class="">And from there, when I’m in the callback function, how do I get the information of the selected point?</div><div class=""><br class=""></div><div class="">Thanks in advance,</div><div class="">Richard</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 18 Apr 2016, at 13:54, Jeff Baumes <<a href="mailto:jeff.baumes@kitware.com" class="">jeff.baumes@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I think you want SetActionToButton() on vtkChart to change mouse bindings. You should be able to listen for a selection event once that is set up.<div class=""><br class=""></div><div class=""><a href="http://www.vtk.org/doc/nightly/html/classvtkChart.html#ac4162187f5f3ad97f0163a079e06f13d" class="">http://www.vtk.org/doc/nightly/html/classvtkChart.html#ac4162187f5f3ad97f0163a079e06f13d</a></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, Apr 15, 2016 at 9:13 AM mbcx9rb9 <<a href="mailto:richard.j.brown@live.co.uk" class="">richard.j.brown@live.co.uk</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br class="">
<br class="">
I'd like to create a custom interactor for vtkChartXY (inherited from<br class="">
vtkContextInteractorStyle), but I can't figure out how to select single<br class="">
points with the left click of the mouse. Once I manage to that, I would need<br class="">
to return the index of the selected point.<br class="">
<br class="">
This seems very straightforward to me, but I haven't seen any concrete<br class="">
examples.<br class="">
<br class="">
Any pointers would be greatly appreciated.<br class="">
<br class="">
Regards,<br class="">
Richard<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
--<br class="">
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkChartXY-picking-tp5737711.html" rel="noreferrer" target="_blank" class="">http://vtk.1045678.n5.nabble.com/vtkChartXY-picking-tp5737711.html</a><br class="">
Sent from the VTK - Users mailing list archive at <a href="http://nabble.com" class="">Nabble.com</a>.<br class="">
_______________________________________________<br class="">
Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank" class="">www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank" class="">http://www.kitware.com/opensource/opensource.html</a><br class="">
<br class="">
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank" class="">http://www.vtk.org/Wiki/VTK_FAQ</a><br class="">
<br class="">
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank" class="">http://markmail.org/search/?q=vtkusers</a><br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank" class="">http://public.kitware.com/mailman/listinfo/vtkusers</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>