<div dir="ltr">Hello!<div><br></div><div style>If I extend my mentioned example (&#39;<span style="font-size:13px;background-color:rgb(245,245,245);color:rgb(0,0,0);font-family:Arial,Helvetica,&#39;Luxi Sans&#39;,sans-serif">Form1.cs&#39;) by:</span></div>
<div style><span style="background-color:rgb(245,245,245)"><font color="#000000" face="Arial, Helvetica, Luxi Sans, sans-serif"><div>this.buttonWidget = vtkButtonWidget.New();</div><div>iren.LeftButtonPressEvt += new vtkObject.vtkObjectEventHandler(dummyEvnt);</div>
<div>this.buttonWidget.SetInteractor(this.RendWinInteractor);</div><div>this.buttonWidget.On();</div></font></span></div><div style><span style="background-color:rgb(245,245,245)"><font color="#000000" face="Arial, Helvetica, Luxi Sans, sans-serif">and the event will fired, so I guess your snippet is working and the error is located elsewhere.</font></span></div>
<div style><br></div><div style><br></div><div style>regards</div><div style><br></div><div style>mirko</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 4, 2013 at 3:28 PM, louiskoo <span dir="ltr">&lt;<a href="mailto:419655660@qq.com" target="_blank">419655660@qq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes,I have taken your suggstion.<br>
<br>
  vtkButtonWidget buttonWidget = vtkButtonWidget.New();<br>
            vtkRenderWindowInteractor renderInteractor =<br>
renderWindowControl1.RenderWindow.GetInteractor();<br>
            renderInteractor.LeftButtonPressEvt += new<br>
vtkObject.vtkObjectEventHandler(renderInteractor_LeftButtonPressEvt);<br>
            buttonWidget.SetInteractor(renderInteractor);<br>
            buttonWidget.SetRepresentation(rep);<br>
            //buttonWidget.LeftButtonPressEvt += new<br>
vtkObject.vtkObjectEventHandler(buttonWidget_LeftButtonPressEvt);<br>
            buttonWidget.On();<br>
<br>
But the result is that the buttonWidget has no effect when I click the<br>
buttonWidget .<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkButtonSource-vtkRectangularButtonSource-vtkEllipticalButtonSource-tp5721752p5721767.html" target="_blank">http://vtk.1045678.n5.nabble.com/vtkButtonSource-vtkRectangularButtonSource-vtkEllipticalButtonSource-tp5721752p5721767.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Real programmers don&#39;t document; if it was<br>hard to write, it should be hard to understand.
</div>