TXTextControl.TXTextControl.ObjectGetSelected Method

This method returns the identifier of the currently selected object. An object is selected, if a frame with size handles is drawn around the object. This method can also be used to determine whether a certain kind of object, image, text frame or OLE object, is selected.

Introduced: 12.0.

Syntax

TXTextControl.ObjectGetSelected ObjectKind
Parameter Description
ObjectKind

This parameter specifies which kind of objects are searched. It can be a sum of the values, described in Remarks. If this parameter is zero, all objects are searched.

Return Value

The method returns the identifier of an object. It returns zero if no object of the specified kind is selected.

Remarks

The settings for ObjectKind can include:


Value Description
&H1 Looks only for objects positioned at a fixed geometrical position.
&H2 Looks only for objects that act as a single character.
&H4 Looks only for images.
&H8 Looks only for objects which are externally created by the application.
&H10 Looks only for OLE objects.
&H20 Looks only for text frames.
&H40 Looks only for objects that are anchored to a paragraph.

Data Types

ObjectKind:    Integer
Return value:    Integer

See Also