System.UITypes.StripAllFromResult

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function StripAllFromResult(const AModalResult: TModalResult): TModalResult;

C++

extern DELPHI_PACKAGE TModalResult __fastcall StripAllFromResult(const TModalResult AModalResult);

Properties

Type Visibility Source Unit Parent
function public
System.UITypes.pas
System.UITypes.hpp
System.UITypes System.UITypes

Description

Converts <AModalResult> from a value that refers to "all" to the corresponding simple value.

StripAllFromResult converts the mrAll, mrNoToAll, or mrYesToAll values into mrOk (Ok), mrNo (No), or mrYes (Yes) values correspondingly.

For example, you can check the result of the ShowModal method with the IsAnAllResult function. If IsAnAllResult returns True, you can call StripAllFromResult to convert the result to a value identifying a simple button (Ok, No, or Yes). This allows to simplify the business code processing results of the ShowModal method.

See Also