GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoView Class / ObjectSingleClicked Event
Example
In This Topic
    ObjectSingleClicked Event
    In This Topic
    A document object was single clicked by the user.
    Syntax
    [Category("GoView")]
    [Description("A document object was single clicked by the user (a GoObjectEventHandler)")]
    public event GoObjectEventHandler ObjectSingleClicked
    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.

    PropertyDescription
    Gets whether Modifiers has Keys.Alt set. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets or sets the MouseButtons used with this input event. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets whether Modifiers has Keys.Control set. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets or sets the amount of change associated with a mouse-wheel rotation. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets or sets the point at which this input event occurred. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets or sets whether this is a double-click event. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets or sets the DragEventArgs associated with this input event. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets or sets the GoObject associated with this event.  
    Gets or sets the GoInputState as defined by various tools. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets whether Buttons equals MouseButtons.Right. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets or sets the key pressed as this input event. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets or sets the KeyEventArgs associated with this input event. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets or sets the modifier keys used with this input event. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets or sets the MouseEventArgs associated with this input event. (Inherited from Northwoods.Go.GoInputEventArgs)
    Gets whether Modifiers has Keys.Shift set. (Inherited from Northwoods.Go.GoInputEventArgs)
    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.OnSingleClick, 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.ObjectSingleClicked += new GoObjectEventHandler(MyView_ObjectSingleClicked);
    ...
    private void MyView_ObjectSingleClicked(Object sender, GoObjectEventArgs evt) {
      GoBasicNode bn = evt.GoObject.ParentNode as GoBasicNode;
      if (bn != null) {
        MessageBox.Show("Clicked on " + bn.Text);
      }
    }
    See Also