Vcl.Controls.StripAllFromResult
Delphi
function StripAllFromResult(const AModalResult: TModalResult): TModalResult;
C++
extern DELPHI_PACKAGE System::Uitypes::TModalResult __fastcall StripAllFromResult(const System::Uitypes::TModalResult AModalResult);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | Vcl.Controls |
Description
Converts a TModalResult value from a constant that refers to "all" to the corresponding simple constant.
Call StripAllFromResult to remove the "all" interpretation from a TModalResult value. For example, after checking the result from a form's ShowModal method with the IsAnAllResult function, you can call StripAllFromResult to allow common code to process results that apply to a single selected item or all items.
StripAllFromResult makes the following conversions:
AModalResult | Return value |
---|---|
mrAll |
mrOk |
mrNoToAll |
mrNo |
mrYesToAll |
mrYes |