[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Dialogs' (#lcl)

TFindDialog.Execute

Displays the dialog form and responds to button clicks.

Declaration

Source position: dialogs.pp line 501

public function TFindDialog.Execute: Boolean; override;

Function result

True if the dialog was successfully configured and displayed in the method.

Description

Execute is an overridden Boolean function used to display the internal dialog form and respond to button clicks on the form. Execute reimplements the method defined in the ancestor class, and does not call the inherited method.

If a TForm instance already exists in the dialog class, it is reused. If not, CreateForm is called to create and configure the TForm instance displayed for the dialog. The return value is False if a TForm instance was not successfully created in CreateForm.

When a valid form exists for the dialog, it is positioned on the screen by calling CalcPosition. SetFormValues is called to transfer property values in the class instance to the dialog form. The Title, HelpContext, OnClose and OnShow properties in the form are updated and its Show method is called to display and execute the form. Values from the Height and Width properties in the form are stored in the dialog class for use as the default size.

The return value is True if the form was successfully configured and displayed in the method.

Use the OnFind, OnHelpClicked event handlers to perform actions needed when either the Find or the Help button on the dialog form is clicked. The Cancel button calls CloseDialog when the button is clicked.

See also

TFindDialog.CreateForm

  

Creates and configures the internal form displayed for the dialog.

TFindDialog.CalcPosition

  

Determines the position for the dialog form and captures its coordinates.

TFindDialog.SetFormValues

  

Stores property values in the class instance to the controls on the dialog form.

TFindDialog.OnFind

  

Event handler signalled when the Find button is clicked on the dialog form.

TFindDialog.OnHelpClicked

  

Event handler signalled when the Help button is clicked on the dialog form.

TFindDialog.CloseDialog

  

Closes the dialog form when its Cancel button is clicked.

TFindDialog.Left

  

Coordinate for the Left side of the dialog form.

TFindDialog.Top

  

Coordinate for the Top edge of the dialog form.

TCommonDialog.Title

  

The Title or Caption displayed for the dialog.

TCommonDialog.HelpContext

  

Help context identifier for the help message displayed for the dialog.

TCommonDialog.OnClose

  

Event handler signalled when the dialog is closed.

TCommonDialog.OnShow

  

Event handler signalled when the dialog is displayed.

TCommonDialog.Height

  

The height of the dialog.

TCommonDialog.Width

  

The width of the dialog.

TCommonDialog.Execute

  

Displays the dialog and captures the result.


Version 4.0 Generated 2025-05-03 Home