Description

Select one or all graphic objects or a group of objects.

Return Type

None  

Syntax

object.Select [Selection], [AllowMultiple]

The Select Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McGraphOverlay.
SelectionOptional. A Variant value.

Either missing, Nothing, an McGraphObj or a rectangle. If Missing or Nothing then all objects with the mcgsAllowselect Sytle bit are selected if the AllowMultiple argument is supplied as TRUE. If missing or Nothing and the AllowMultiple argument is supplied as FALSE, then all objects are deselected.

If a single McGraphObj is given then the specified object is selected; other objects will be deselected unless the AllowMultiple argument is supplied as TRUE.

If a rectangle is supplied (as either a SINGLERECT or an array of 4 values in the order left,top,right,bottom), then it is treated as a rectangle in image coordinates within which to invert the selection of all objects with the the mcgsAllowselect Sytle bit ("invert the selection" means that selected objects within the rectangle become deselected and vice versa). The AllowMultiple argument is forced to true in this case.

AllowMultipleOptional. A Boolean value.

is true, then all objects are selected; if it is false, then no objects are selected (i.e., all objects are deselected).

Remarks

When an object is selected, its handles are drawn as well.

When a rectangle is used for Selection, it can be a SINGLERECT structure or an array of 4 float (Single in VB) values. These values are all in image coordinates.

Notes

Even though SINGLERECT is the natural rectangle type for the Selection argument, it may also be supplied as an array of 4 values of any numeric type or as a LONGRECT or DOUBLERECT.

The ObjectSelected notifications are always sent with the NotifyContext mcgoncFromTool bit off. If you want to signal to nofify sinks that the Select call is from a user interface element (e.g., a tool), then assign mcgoncFromUser to the NotifyContext property just before calling Select.