Finds the first matching item and returns its index.
Namespace: Cognex.VisionPro.DisplayAssembly: Cognex.VisionPro.Display.Controls (in Cognex.VisionPro.Display.Controls.dll) Version: 80.0.0.0 (80.0.0.0)
Syntax
Parameters
- objectOrGroupName
- Type: System Object
The item to find or the name of a graphics group.
- searchOrigin
- Type: Cognex.VisionPro.Display CogDisplayZOrderConstants
When searchOrigin is Front, the search starts at the front of the z-order. When searchOrigin is Back, the search starts at the end of the z-order.
Return Value
Type: Int32The index of the matching item, or -1 if no item was found.
Exceptions
| Exception | Condition |
|---|---|
| ObjectDisposedException | Thrown when the object is already disposed. |
| CogException | Thrown when any of the arguments are invalid. |
Remarks
If objectOrGroupName is a group name, FindItem(Object, DisplayZOrderConstants) returns the first item in the group when searchOrigin is Front and the last item in the group when searchOrigin is Back.
Examples
See Also