Event handling (begginer question)

script
event
rhinocommon
python
event_handling

#1

Just to make sure I understand well,

All viewport related event handling including selecting objects, points, keyboard strokes etc. can be found in RhinoCommon. And events that refers to the plugin user interface for example: click on button etc. is in the .Net c# documents namely under the Winform or other ui libraries.

So, for example if I want Rhino to act after a double click I need to find resources in the Rhino Common and not under MS c# documentation.


(Menno Deij - van Rijswijk) #2

Yes. If you want to act on mouse events, you need to inherit from the MouseCallback class, then override the OnMouseDoubleClick method. Be sure to set the callback object’s .Enabled = true.

See

http://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_UI_MouseCallback.htm