GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoObject Class / Pick Method
A PointF in document coordinates.
Whether the return value must be selectable by the user.
In This Topic
    Pick Method (GoObject)
    In This Topic
    Return an object at a point, perhaps only a selectable one.
    Syntax
    public virtual GoObject Pick( 
       PointF p,
       bool selectableOnly
    )

    Parameters

    p
    A PointF in document coordinates.
    selectableOnly
    Whether the return value must be selectable by the user.

    Return Value

    An object under the point p. If selectableOnly is true, the object returned will have its CanSelect property be true. This method returns null if no suitable object is found.
    Remarks

    This will return null if this object is not visible or if the p is not in this object.

    If selectableOnly is false, it will return this object; if that parameter is true, it will return this object only if CanSelect is true.

    Finally, if CanSelect is false, and this object is part of a GoGroup, it proceeds up the chain of Parent objects until it finds one whose CanSelect property is true, and returns that.

    Failing all of those tests, this method will return null.

    See Also