TTMSFNCTaskDialog Class
Displays a configurable task dialog with instruction text, content, buttons, command links, radio choices, verification, input, progress, and footer areas.
API unit family: TMSFNCTaskDialog
Inherits from: TTMSFNCCustomTaskDialog
Syntax
TTMSFNCTaskDialog = class(TTMSFNCCustomTaskDialog)
class PASCALIMPLEMENTATION TTMSFNCTaskDialog : public TTMSFNCCustomTaskDialog
Properties
| Name | Description |
|---|---|
| Appearance | Gets or sets the visual appearance settings for the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| ApplicationIsParent | Controls whether the application object is used as the dialog parent. True uses the application as parent; False uses the default owner or form relationship. (inherited from TTMSFNCCustomTaskDialog) |
| AutoClose | Controls whether the dialog closes automatically. True enables automatic closing; False keeps the dialog open until the user closes it. (inherited from TTMSFNCCustomTaskDialog) |
| AutoCloseTimeOut | Gets or sets the auto-close timeout value. (inherited from TTMSFNCCustomTaskDialog) |
| BitmapContainer | Gets or sets the bitmap container used to resolve icon and image names. (inherited from TTMSFNCCustomTaskDialog) |
| ButtonFont | Gets or sets the font used for dialog buttons. (inherited from TTMSFNCCustomTaskDialog) |
| CollapseControlText | Gets or sets the text shown on the collapse control. (inherited from TTMSFNCCustomTaskDialog) |
| CommandLinkFont | Gets or sets the font used for command-link buttons. (inherited from TTMSFNCCustomTaskDialog) |
| CommonButtons | Gets or sets the set of standard buttons shown by the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| Content | Gets or sets the main content text shown below the instruction. (inherited from TTMSFNCCustomTaskDialog) |
| CustomButtons | Gets or sets the custom button captions shown by the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| CustomIcon | Gets or sets a custom bitmap used instead of the standard dialog icon. (inherited from TTMSFNCCustomTaskDialog) |
| DefaultButton | Gets or sets the zero-based index of the button that receives initial focus and acts as the default when the dialog opens. (inherited from TTMSFNCCustomTaskDialog) |
| DefaultRadioButton | Gets or sets the initially selected radio button index. (inherited from TTMSFNCCustomTaskDialog) |
| DialogForm | Gets the form instance used to display the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| DialogPosition | Gets or sets where the dialog is positioned when shown. (inherited from TTMSFNCCustomTaskDialog) |
| DisplayedButtons | Controls which built-in buttons are displayed by the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| ExpandControlText | Gets or sets the text shown on the expand control. (inherited from TTMSFNCCustomTaskDialog) |
| ExpandedText | Gets or sets the additional text shown when the dialog is expanded. (inherited from TTMSFNCCustomTaskDialog) |
| Footer | Gets or sets the footer text displayed at the bottom of the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| FooterIcon | Gets or sets the standard icon displayed in the footer area. (inherited from TTMSFNCCustomTaskDialog) |
| GlobalFont | Gets or sets the global font behavior used by the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| Icon | Gets or sets the standard icon displayed in the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| InputControl | Gets or sets a custom input control hosted by the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| InputItems | Gets or sets the list items used by list-style input controls. (inherited from TTMSFNCCustomTaskDialog) |
| InputText | Gets or sets the input text value shown in or returned from the dialog input control. (inherited from TTMSFNCCustomTaskDialog) |
| InputType | Gets or sets the type of input control displayed by the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| Instruction | Gets or sets the primary instruction text shown prominently in the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| MaxDialogWidth | Gets or sets the maximum dialog width in pixels. (inherited from TTMSFNCCustomTaskDialog) |
| MinDialogWidth | Gets or sets the minimum dialog width in pixels. (inherited from TTMSFNCCustomTaskDialog) |
| Options | Gets or sets the dialog behavior options, such as command links, verification, progress, timer, and expansion behavior. (inherited from TTMSFNCCustomTaskDialog) |
| RadioButtonResult | Gets or sets the selected radio button result index. (inherited from TTMSFNCCustomTaskDialog) |
| RadioButtons | Gets or sets the radio button captions displayed by the dialog. (inherited from TTMSFNCCustomTaskDialog) |
| Title | Gets or sets the dialog window title. (inherited from TTMSFNCCustomTaskDialog) |
| UseIsOpen | Controls whether the dialog uses the mobile open-state guard. True uses the open-state guard; False does not. (inherited from TTMSFNCCustomTaskDialog) |
| VerifyResult | Gets or sets the verification checkbox result. True means the verification checkbox is checked; False means it is cleared. (inherited from TTMSFNCCustomTaskDialog) |
| VerifyText | Gets or sets the verification checkbox text. (inherited from TTMSFNCCustomTaskDialog) |
Methods
| Name | Description |
|---|---|
| Execute | Shows the dialog asynchronously and invokes the result callback when it closes. (inherited from TTMSFNCCustomTaskDialog) |
Events
| Name | Description |
|---|---|
| OnAutoClose | Occurs when the auto-close timeout is reached. (inherited from TTMSFNCCustomTaskDialog) |
| OnBeforeCloseDialog | Occurs before the dialog closes, letting the handler cancel the close. (inherited from TTMSFNCCustomTaskDialog) |
| OnDialogButtonClick | Occurs when a dialog button is clicked. (inherited from TTMSFNCCustomTaskDialog) |
| OnDialogClosed | Occurs after the dialog form is closed. (inherited from TTMSFNCCustomTaskDialog) |
| OnDialogCreated | Occurs after the dialog form is created. (inherited from TTMSFNCCustomTaskDialog) |
| OnDialogExpandButtonClick | Occurs when the expand or collapse button is clicked. (inherited from TTMSFNCCustomTaskDialog) |
| OnDialogProgress | Occurs when the dialog requests a progress value update. (inherited from TTMSFNCCustomTaskDialog) |
| OnDialogRadioClick | Occurs when a dialog radio button is clicked. (inherited from TTMSFNCCustomTaskDialog) |
| OnDialogResult | Occurs when the dialog returns a modal result. (inherited from TTMSFNCCustomTaskDialog) |
| OnDialogTimer | Occurs when the dialog timer fires. (inherited from TTMSFNCCustomTaskDialog) |
| OnDialogVerifyClick | Occurs when the verification checkbox is clicked. (inherited from TTMSFNCCustomTaskDialog) |
Usage examples
Configure and show a command-link task dialog
Sets the main text, command links, expandable text, footer, and verification prompt before executing the dialog.
procedure TForm1.ConfigureTaskDialog;
begin
TMSFNCTaskDialog1.Title := 'Save changes';
TMSFNCTaskDialog1.Instruction := 'Choose how to continue before closing this project.';
TMSFNCTaskDialog1.Content := 'Unsaved changes will be lost if you close without saving.';
TMSFNCTaskDialog1.Icon := tdiInformation;
TMSFNCTaskDialog1.Options := TMSFNCTaskDialog1.Options + [tdoCommandLinks, tdoCommandLinksNoIcon];
TMSFNCTaskDialog1.CustomButtons.Clear;
TMSFNCTaskDialog1.CustomButtons.Add('Save and close');
TMSFNCTaskDialog1.CustomButtons.Add('Close without saving');
TMSFNCTaskDialog1.CustomButtons.Add('Cancel');
TMSFNCTaskDialog1.ExpandedText := 'The project file and all open documents are checked before closing.';
TMSFNCTaskDialog1.ExpandControlText := 'Show details';
TMSFNCTaskDialog1.CollapseControlText := 'Hide details';
TMSFNCTaskDialog1.Footer := 'You can change this behavior in application options.';
TMSFNCTaskDialog1.FooterIcon := tdiWarning;
TMSFNCTaskDialog1.VerifyText := 'Do not ask again for this project';
TMSFNCTaskDialog1.Execute;
end;