[Category("GoView")] [Description("A document object was context clicked by the user (a GoObjectEventHandler)")] public event GoObjectEventHandler ObjectContextClicked
Event Data
The event handler receives an argument of type GoObjectEventArgs containing data related to this event. The following GoObjectEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Alt | Gets whether Modifiers has Keys.Alt set. (Inherited from Northwoods.Go.GoInputEventArgs) |
Buttons | Gets or sets the MouseButtons used with this input event. (Inherited from Northwoods.Go.GoInputEventArgs) |
Control | Gets whether Modifiers has Keys.Control set. (Inherited from Northwoods.Go.GoInputEventArgs) |
Delta | Gets or sets the amount of change associated with a mouse-wheel rotation. (Inherited from Northwoods.Go.GoInputEventArgs) |
DocPoint | Gets or sets the point at which this input event occurred. (Inherited from Northwoods.Go.GoInputEventArgs) |
DoubleClick | Gets or sets whether this is a double-click event. (Inherited from Northwoods.Go.GoInputEventArgs) |
DragEventArgs | Gets or sets the DragEventArgs associated with this input event. (Inherited from Northwoods.Go.GoInputEventArgs) |
GoObject | Gets or sets the GoObject associated with this event. |
InputState | Gets or sets the GoInputState as defined by various tools. (Inherited from Northwoods.Go.GoInputEventArgs) |
IsContextButton | Gets whether Buttons equals MouseButtons.Right . (Inherited from Northwoods.Go.GoInputEventArgs) |
Key | Gets or sets the key pressed as this input event. (Inherited from Northwoods.Go.GoInputEventArgs) |
KeyEventArgs | Gets or sets the KeyEventArgs associated with this input event. (Inherited from Northwoods.Go.GoInputEventArgs) |
Modifiers | Gets or sets the modifier keys used with this input event. (Inherited from Northwoods.Go.GoInputEventArgs) |
MouseEventArgs | Gets or sets the MouseEventArgs associated with this input event. (Inherited from Northwoods.Go.GoInputEventArgs) |
Shift | Gets whether Modifiers has Keys.Shift set. (Inherited from Northwoods.Go.GoInputEventArgs) |
ViewPoint | Gets or sets the point at which this input event occurred. (Inherited from Northwoods.Go.GoInputEventArgs) |
Remarks
This event is raised for the first document object found at the GoInputEventArgs.DocPoint. Unlike GoObject.OnContextClick, which proceeds up the GoObject.Parent chain until a call returns true, this event occurs only once. Thus you will often need to look at the GoObject.ParentNode or GoObject.TopLevelObject in order to find the most meaningful object to really handle the click.
Example
MyView.ObjectContextClicked += new GoObjectEventHandler(MyView_ObjectContextClicked); ... private void MyView_ObjectContextClicked(Object sender, GoObjectEventArgs evt) { GoBasicNode bn = evt.GoObject.ParentNode as GoBasicNode; if (bn != null) { MessageBox.Show("Context-clicked on " + bn.Text); } }
See Also