AnnTextEdit method (ILEADRasterAnnotation)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short AnnTextEdit(long hObject);

Overview

Refer to Implementing Annotations.

Remarks

(Document/Medical only) Causes a text-based annotation to enter edit mode.

This method causes a text-based annotation to enter edit mode, which displays an edit window for direct entry of text. Calling this method allows a user to programmatically force an object into edit mode—an action that is normally available in automation mode when creating or double-clicking text-based annotations.

It can be used with any of the text-based annotations including:

image\sqrblit.gif ANN_OBJECT_TEXT

image\sqrblit.gif ANN_OBJECT_TEXTPOINTER

image\sqrblit.gif ANN_OBJECT_NOTE

image\sqrblit.gif ANN_OBJECT_PUSHPIN

image\sqrblit.gif ANN_OBJECT_RTF

A successful call to the AnnSetText method affects hObject in the following way:

image\sqrblit.gif If hObject is not selected, hObject becomes selected, and all other objects become unselected.

image\sqrblit.gif If hObject is already selected, then the selection state of all objects is unchanged.

image\sqrblit.gif If hObject is one of several objects selected, then the selection state of all objects is unchanged.

Only one object can be in text edit mode. Therefore, if another text object is in text edit mode (hObject2), calling the AnnTextEdit method will get hObject2 out of the text edit mode and put hObject into the text edit mode.

This method will fail with ERROR_AUTOMATION_INV_HANDLE if hObject is not contained in the root container and if it is not in the automated mode. This method works only with the following objects:

image\sqrblit.gif ANN_OBJECT_TEXT

image\sqrblit.gif ANN_OBJECT_TEXTPOINTER

image\sqrblit.gif ANN_OBJECT_NOTE

image\sqrblit.gif ANN_OBJECT_PUSHPIN

image\sqrblit.gif ANN_OBJECT_RTF

If you pass an object that is not one of these types, the method will return ERROR_INV_PARAMETER.

See Also

Elements:

AnnGetText method, AnnGetAutoText method, AnnSetAutoText method, AnnRTFText property, AnnTextAlign property

Topics:

Annotations (Document/Medical only): Object Manipulation