TXTextControl.TXTextControl.ContextMenuOpening Event

Occurs before a built-in context menu is opened.

Introduced: 19.0.

Syntax

ContextMenuOpening(DocumentLocation, Cancel)
Parameter Description
DocumentLocation

Specifies the part of the document for which the menu is opened. It can be one or more of the following values:


Value Description
&H1 The menu context is a text selection.
&H2 The menu context is the text input position.
&H4 The menu context is the top page margin which contains a header.
&H8 The menu context is the top page margin which contains no header.
&H10 The menu context is the bottom page margin which contains a footer.
&H20 The menu context is the bottom page margin which contains no footer.
&H40 The menu context is the top or the bottom page margin.
&H80 The menu context is a pagenumber field.
&H100 The menu context is a selected frame (text frame, image, or OLE object).
&H200 The menu context is a text selection or a text input position in a table.
&H400 The menu context is a text selection or a text input position in a marked text field.
Cancel

When this parameter is set to TRUE, processing is aborted and no context menu is opened. It can be used to display an own menu.

Data Types

DocumentLocation:    Integer
Cancel:    Boolean

See Also