FMX.Forms.TCommonCustomForm.ModalResult

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

property ModalResult: TModalResult read FModalResult write SetModalResult;

C++

__property System::Uitypes::TModalResult ModalResult = {read=FModalResult, write=SetModalResult, nodefault};

Properties

Type Visibility Source Unit Parent
property public
FMX.Forms.pas
FMX.Forms.hpp
FMX.Forms TCommonCustomForm

Description

Represents the return value of a form that is used as a modal dialog box.

Use ModalResult to close the form when it is displayed modally.

By default, ModalResult is mrNone. Set ModalResult to any nonzero value to close the form. The ModalResult value becomes the return value of the ShowModal function called to display the form.

The following table lists the constants defined in the System.UITypes unit to be used for the ModalResult property of the TModalResult type.

Constant Value Meaning

mrNone

0

None. Used as a default value before the user exits.

mrOk

idOK = 1

The user exited with the OK button.

mrCancel

idCancel = 2

The user exited with the CANCEL button.

mrAbort

idAbort = 3

The user exited with the ABORT button.

mrRetry

idRetry = 4

The user exited with the RETRY button.

mrIgnore

idIgnore = 5

The user exited with the IGNORE button.

mrYes

idYes = 6

The user exited with the YES button.

mrNo

idNo = 7

The user exited with the NO button.

mrClose

idClose = 8

The user exited with the CLOSE button.

mrHelp

idHelp = 9

The user exited with the HELP button.

mrTryAgain

idTryAgain = 10

The user exited with the TRY AGAIN button.

mrContinue

idContinue = 11

The user exited with the CONTINUE button.

mrAll

mrContinue + 1 (12 or $C)

The user exited with the ALL button.

mrNoToAll

mrAll +1 (13 or $D)

The user exited with the NO TO ALL button.

mrYesToAll

mrNoToAll +1 (14 or $E)

The user exited with the YES TO ALL button.

You can check a ModalResult value using the global IsAbortResult, IsAnAllResult, IsNegativeResult, or IsPositiveResult functions and use the StripAllFromResult function to convert ModalResult values that refers to "ALL" buttons to values identifying corresponding simple buttons (Ok, No, or Yes).

Note: This property can be modified automatically setting corresponding ModalResult properties of controls in the modal form.

See Also