Sign in Join
FPDoc Onlineexperiment

TCustomTaskDialog class

In unit Dialogs

Defines a configurable, modal task dialog at run-time.

Declaration

pascal
TCustomTaskDialog = class(TLCLComponent)

Inheritance

  1. TCustomTaskDialog
  2. TLCLComponent
  3. TComponent
  4. TPersistent
  5. TObject

Descends from it: TTaskDialog

Description

TCustomTaskDialog is a TLCLComponent descendant which defines a configurable, modal task dialog. It can be used to display and edit information on a dialog form with more features than those available on a standard message box. TCustomTaskDialog includes values like:

  • A Title for the dialog.
  • A Caption for the dialog.
  • A main Icon for the dialog.
  • Text to describe the task dialog.
  • A footer to display additional information on the dialog.
  • An expandable / collapsible text area which can be displayed in the main content area or the footer for the dialog.
  • Standard buttons used to return a modal result value.
  • Custom command buttons for task-specific actions.
  • Radio buttons to select dialog options.
  • A progress bar using either the standard or marquee display styles.
  • A query field to capture user input as text or by selecting a value from a list of values in a combo-box control.
  • A verification message and check box.
  • Support for hyperlinks in text areas.

TCustomTaskDialog is the base class for TaskDialog, and provides a multi-platform implementation of the Windows TaskDialog API. It provides properties which can be used to configure the task dialog at design-time or at run-time. At run-time, the Execute method handles converting properties and calling routines and methods in the widgetset which implement the task dialog for a given platform.

Platform Support

The TaskDialog API, upon which TCustomTaskDialog and TTaskDialog are based, is available only on Windows Vista or later versions. On these platforms, the form displayed at run-time is the native form for the platform. On older Windows versions, and other platforms, the TaskDialog API is not available or supported. For these platforms, a standard LCL form is created and populated at run-time to emulate the appearance and behaviors for the Windows implementation. This occurs in the widget set class and uses the components found in the taskdlgemulation.pp unit. It can be forced by including a value in the Flags property for the class instance.

Modified in LCL version 4.0. The implementation for the most part is rewritten, and includes additional features not found in previous versions.

See also

Properties

ButtonpublicNot used in the current LCL version.
ButtonspublicCollection with the buttons for the Task dialog.
CaptionpublicCaption text displayed on the title bar for the Task dialog.
CustomFooterIconpublicContains a custom icon displayed in the footer area on the dialog.
CustomMainIconpublicContains a custom icon displayed in the main content area on the dialog.
CommonButtonspublicSet of common buttons displayed on the Task dialog.
CollapseButtonCaptionpublicCaption text for the "expando" button on the task dialog.
DefaultButtonpublicIndex of the default button, from the set in the CommonButtons property.
ExpandButtonCaptionpublicCaption displayed for the expand/collapse button on the dialog.
ExpandedTextpublicText that is displayed in the expandable / collapsible area on the Task dialog.
FlagspublicSet of options enabled for the Task dialog.
FooterIconpublicIcon for the footer area displayed at the bottom of the dialog.
FooterTextpublicText that is displayed in the footer area on the Task dialog.
MainIconpublicIcon displayed beside the Title for the dialog.
HandlepublicHandle for the form displayed for the task dialog.
ModalResultpublicModal result value returned when the Task dialog was executed.
ProgressBarpublicContains information used to configure and update a progress bar enabled on the task dialog.
QueryChoicespublicPredefined values for the query control on the task dialog.
QueryItemIndexpublicOrdinal position for the value in QueryChoices selected when the task dialog is executed.
QueryResultpublicString representation for the query entered or selected on the dialog form.
RadioButtonpublicThe radio button selected on the Task dialog.
RadioButtonspublicCollection with the optional radio buttons defined for the Task dialog.
SimpleQuerypublicContains the text displayed and edited using the query control on the task dialog.
SimpleQueryPasswordCharpublicCharacter value used to obfuscate text in SimpleQuery for the query control.
TextpublicText displayed as main content for the Task dialog.
TitlepublicText displayed at the top of dialog adjacent to the main icon.
VerificationTextpublicOptional caption for the verification check box displayed near the bottom of the Task dialog.
WidthpublicSets the width in pixels for the task dialog form.
URLpublicUniversal Resource Locator (or identifier) for a hyperlink clicked on the task dialog.
ExpandedpublicIndicates the expanded or collapsed state for the ExpandedText on the task dialog form.

Methods

WSRegisterClassprotectedRegisters the task dialog class in the widgetset when needed.
DoExecuteprotectedPerforms actions to configure and execute the dialog.
DoOnButtonClickedprotectedSignals the OnButtonClicked event handler (when assigned) for the button with the specified modal result value.
DoOnRadioButtonClickedprotectedSets the active radio button and signals the OnRadioButtonClicked event handler (when assigned).
DoOnDialogConstructedprotectedSignals the OnDialogConstructed event handler (when assigned).
DoOnDialogCreatedprotectedSignals the OnDialogCreated event handler (when assigned).
DoOnDialogDestroyedprotectedSignals the OnDialogDestroyed event handler (when assigned).
DoOnExpandButtonClickedprotectedUpdates the value in the Expanded property and signals the OnExpanded event handler (when assigned).
DoOnTimerprotectedSignals the OnTimer event handler (when assigned) using the specified parameter values.
DoOnVerificationClickedprotectedUpdates Flags to reflect the checked state for the verification control and signals the OnVerificationClicked event handler (when assigned).
DoOnHelpprotectedSignals the OnHelp event handler (when assigned).
DoOnHyperlinkClickedprotectedUpdates the value in URL and signals the OnHyperlinkClicked event handler (when assigned).
DoOnNavigatedprotectedSignals the OnNavigated event handler (when assigned).
InternalSetDialogHandleprotectedSets the value for the Handle property.
SetRadioButtonFromRadioIndexprotectedMakes the radio button with the specified identifier the active RadioButton on the task dialog.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
ButtonIDToModalResultpublicGets the modal result value for the button with the specified identifier.
ExecutepublicDisplays the task dialog and captures the modal result value.

Events

OnButtonClickedpublicEvent handler signalled for the button clicked when the Task dialog was executed.
OnDialogConstructedpublicEvent handler signalled when the constructor for the dialog form instance has completed.
OnDialogCreatedpublicEvent handler signalled when a form instance has been created for the dialog.
OnDialogDestroyedpublicEvent handler signalled when the task dialog form has been freed for the class instance.
OnVerificationClickedpublicEvent handler signalled when the verification check box has been clicked on the task dialog.
OnExpandedpublicEvent handler signalled when the ExpandedText on the dialog has been expanded or collapsed.
OnTimerpublicEvent handler signalled when the interval for the timer on the dialog has elapsed.
OnRadioButtonClickedpublicEvent handler signalled when a radio button on the dialog has been clicked.
OnHyperlinkClickedpublicEvent handler signalled when a hyperlink in one of the text areas has been clicked.
OnNavigatedpublic
OnHelppublicEvent handler signalled to display help for the task dialog.

Inherited

From TLCLComponent (7)

DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance RemoveAllHandlersOfObject WidgetSetClass

From TComponent (74)

_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (5)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (36)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

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