TCustomTaskDialog.ButtonIDToModalResult function
Gets the modal result value for the button with the specified identifier.
Declaration
function ButtonIDToModalResult(const AButtonID: Integer): TModalResultArguments
AButtonID | Numeric identifier for the button with the modal result value returned in the method. |
Function result
Modal result value for the button with the specified identifier.
Description
ButtonIDToModalResult is a
TModalResult function used to
get the modal result value for the button with the identifier specified in the
AButtonID argument.
AButtonID contains one of the button identifier constants which correspond to the standard Buttons used on the task dialog, including:
- IDOK
- IDCANCEL
- IDABORT
- IDRETRY
- IDIGNORE
- IDYES
- IDNO
- IDCLOSE
If AButtonID is in the range of button identifiers starting at TaskDialogFirstButtonIndex, but is not found in Buttons, the value in AButtonID is used in the return value. If the identifier is valid for and found in Buttons, the return value is set to one the modal result constants like:
- mrOK
- mrCancel
- mrAbort
- mrRetry
- mrIgnore
- mrYes
- mrNo
- mrClose
- mrNone
The return value is set to mrNone if AButtonID is not valid for or not found in the Buttons collection.
ButtonIDToModalResult is called from the DoExecute method using the button identifier returned from the Execute method in the widgetset class instance.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
