TriggerControl() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns the ID of the last dialog control chosen by the user. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

TriggerControl()

Return Value

Integer

Description

Within a Dialog statement's handler procedure, the TriggerControl() function returns the control ID of the last control which the user operated.

Each control in a dialog box can have its own dedicated handler procedure; alternately, one procedure can act as the handler for two or more controls. A procedure which handles multiple controls can use the TriggerControl() function to detect which control the user clicked.

Error Conditions

ERR_INVALID_TRIG_CONTROL (843) error is generated if the TriggerControl() function is called when no dialog box is active.

See Also:

Alter Control statement, Dialog statement, Dialog Preserve statement, Dialog Remove statement, ReadControlValue() function