Sign in Join
FPDoc Onlineexperiment

TDialogButtons.FindButton function

Member of TDialogButtonspublicIn unit InterfaceBase

Finds the button associated with (one of) the given modal result values.

Declaration

pascal
function FindButton(AModalResult: LongInt): TDialogButton
function FindButton(Order: Array of LongInt): TDialogButton

Arguments

AModalResult

The modal result value for the button located in the method.

Order

List of modal result values to find in the collection.

Function result

Dialog button which uses the modal result value.

Description

FindButton is an overloaded TDialogButton function used to locate a dialog button in the collection which uses the specified modal result value. Overloaded variants are provided which accept one or multiple modal result values to locate in the method.

AModalResult contains the modal result value to locate in the collection Items.

AOrder allows an array of modal result values to be located in the method. It specifies the search order for the modal result values.

FindButton iterates over the Items in the collection to find the first button which uses the modal result value(s). The return value is the first TDialogButton instance in Items which matches the requested value(s).

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.