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

# TCustomTaskDialog.QueryResult

String representation for the query entered or selected on the dialog form.

## Declaration

Source position: dialogs.pp line 835

`public property TCustomTaskDialog.QueryResult : string read FQueryResult write FQueryResult;`

## Description

QueryResult is a String property with the value for the query control dialog form. The content may reflect either the SimpleQuery or the selected value in QueryChoices for the class instance.

Use Flags to specify which editing control and mode are used to capture the query value (tfSimpleQuery for SimpleQuery and tfQuery for QueryChoices).

QueryResult is set to an empty string ('') when the Execute method is called, and updated prior to exit.

Use ModalResult to determine the button or key press used to complete execution of the task dialog. The value in QueryResult is set to the respective source even when Esc or Alt+F4 is used to cancel the task dialog.

## Version info

Added in LCL version 4.0.

## See also

TCustomTaskDialog.QueryChoices |  | Predefined values for the query control on the task dialog.
TCustomTaskDialog.QueryItemIndex |  | Ordinal position for the value in QueryChoices selected when the task dialog is executed.
TCustomTaskDialog.SimpleQuery |  | Contains the text displayed and edited using the query control on the task dialog.
TCustomTaskDialog.Flags |  | Set of options enabled for the Task dialog.
TCustomTaskDialog.Execute |  | Displays the task dialog and captures the modal result value.
TCustomTaskDialog.DoExecute |  | Performs actions to configure and execute the dialog.
TCustomTaskDialog.ModalResult |  | Modal result value returned when the Task dialog was executed.
TTaskDialogFlags |  | Set type used to store values from the TTaskDialogFlag enumeration.
TTaskDialogFlag |  | Represents options that can be enabled for TTaskDialog.