Sign in Join
FPDoc Onlineexperiment

Dialogs unit

Contains common dialogs used in Lazarus LCL applications.

dialogs.pp contains classes, types, and routines used to implement common dialogs in an application. dialogs.pp is part of the Lazarus Component Library ( LCL).

The following components are added to the Lazarus IDE component palette:

Dialogs Tab

  • TOpenDialog
  • TSaveDialog
  • TSelectDirectoryDialog
  • TColorDialog
  • TFontDialog
  • TFindDialog
  • TReplaceDialog
  • TTaskDialog

Misc Tab

  • TColorButton

Classes and records

TColorButtonclassTColorButton - a SpeedButton designed to be used with the Color dialog, allowing a color to be selected for text or graphics.
TColorDialogclassImplements a dialog used to select a TColor value.
TCommonDialogclassThe base type from which other dialogs are derived.
TCustomCopyToClipboardDialogclassBase class for a dialog form used during copy to clipboard operations.
TCustomPrintDialogclassImplements the base class for TPrintDialog.
TCustomPrinterSetupDialogclassBase class for TPrinterSetupDialog and TPageSetupDialog.
TCustomTaskDialogclassDefines a configurable, modal task dialog at run-time.
TFileDialogclassTFileDialog allows selection of a file from the current directory.
TFindDialogclassTFindDialog - a dialog used for finding text within the current editor or text buffer.
TFontDialogclassDialog used to select a font typeface and size.
TOpenDialogclassImplements a File / Open dialog used to select one or more files on the local file system.
TReplaceDialogclassImplements a find and replace dialog.
TSaveDialogclassTSaveDialog - Dialog for saving the current buffer to a file.
TSelectDirectoryDialogclassImplements a select directory dialog.
TTaskDialogclassImplements a configurable modal task dialog.
TTaskDialogBaseButtonItemclassDefines the base class for a custom button displayed on a Task dialog.
TTaskDialogButtonItemclassImplements a button definition used for a button in TCustomTaskDialog.
TTaskDialogButtonsclassCollection type used to access and maintain buttons defined for a Task dialog.
TTaskDialogButtonsEnumeratorclassImplements an enumerator for buttons defined in a Task dialog.
TTaskDialogProgressBarclassProvides information about a progress bar displayed on a TTaskDialog instance.
TTaskDialogRadioButtonItemclassImplements a radio button displayed on a Task dialog.

Procedures and functions

CreateMessageDialogfunctionCreates a dialog form type with the specified caption, message, and buttons.
dbgsfunctionCreates a formatted debugger message for one or more TOpenOption values.
DefaultInputDialogfunctionWidgetset-independent implementation of an input dialog.
DefaultMessageBoxfunctionWidgetset-independent implementation of a message box routine.
DefaultPromptDialogfunctionWidgetset-independent implementation of a prompt dialog.
DefaultQuestionDialogfunctionImplements a widgetset-independent dialog similar to QuestionDlg.
DialogCopyToClipboardprocedureCopies the content from the specified dialog to the clipboard.
ExtractColorIndexAndColorfunctionExtracts the color index and color value for the specified position in a color list.
GetDialogCaptionfunctionGets the resource string used as the caption for the specified dialog identifier.
GetDialogIconfunctionGets a bitmap with the icon for the specified dialog identifier.
InputBoxfunctionDisplays a box with specified title and prompt, and accepts user input in a text box.
InputCombofunctionCreates and executes a combo-box dialog with the specified Caption, Prompt, and list of selectable values.
InputComboExfunctionDisplays an extended input combo-box dialog that allows entry of custom text values in its Items.
InputQueryfunctionUse InputQuery to show a dialog box to get input from the user.
MessageDlgfunctionShows a message to the user and gets the response.
MessageDlgPosfunctionAn extended MessageDlg function.
MessageDlgPosHelpfunctionAn extended MessageDlgPos function.
PasswordBoxfunctionDisplays a Password prompt with input masking.
PromptForFileNamefunctionDisplays a file open or save dialog to select a file name for the operation.
QuestionDlgfunctionShows a question to the user and gets a response. Similar to MessageDlg, but allows to use custom button captions and user-specified response values.
RegisterprocedureRegisters components for use in the Lazarus IDE.
RegisterDialogForCopyToClipboardprocedureEnables key preview and adds the OnKeyDown handler for the specified dialog.
SelectDirectoryfunctionA function that allows a user to select a directory.
ShowMessageprocedureDisplays the specified message text.
ShowMessageFmtprocedureShows a message assembled from a format string and an array of arguments.
ShowMessagePosprocedureShows a message box at a given screen position.
TaskDlgfunctionProvides a wrapper function used to configure and execute a TTaskDialog instance.

Types

TCDWSEventCapabilitiessetSet type used to store values from the TCDWSEventCapability enumeration.
TCDWSEventCapabilityenumerationRepresents events handled in a custom-drawn widgetset.
TColorDialogOptionenumerationRepresents the options which can be enabled during execution of a color dialog.
TColorDialogOptionssetSet type used to store values from the TColorDialogOption enumeration.
TDialogResultEventprocedure typeSpecifies an event signalled when a result is returned in a dialog.
TFindOptionenumerationA list of possible options which can be used in Find dialogs.
TFindOptionssetSet type used to store TFindOption enumeration values.
TFontDialogOptionenumerationAn enumerated list of constants to set the options of a Font dialog.
TFontDialogOptionssetSet type used to store font dialog options.
TInputCloseQueryEventprocedure typeSpecifies an event handler signalled when an InputQuery dialog is about to close.
TMsgDlgBtntypeIdentifies dialog button types.
TMsgDlgButtonstypeSet type used to store the buttons on a message dialog.
TMsgDlgTypetypeIdentifies the type or style for a message dialog.
TOpenOptionenumerationOptions which can be used in a TOpenDialog instance.
TOpenOptionExenumerationWidgetset-specific open options which cannot be mapped to the standard values in TOpenOptions.
TOpenOptionssetSet type used to store TOpenOption enumeration values.
TOpenOptionsExsetSet type used to store values from the TOpenOptionEx enumeration.
TPrintDialogOptionenumerationEnumerated type with available options for a print dialog.
TPrintDialogOptionssetA set type used for the options in a print dialog.
TPrintRangeenumerationEnumerated type which represents page ranges used in a print dialog.
TProgressBarStatetypeAlias to the TProgressBarState type in comctrls.pp.
TSelectDirOptenumerationList of options available when selecting a directory.
TSelectDirOptssetSet type used to store directory selection options.
TTaskDialogCommonButtonenumerationIdentifier used for common buttons visible on a Task dialog.
TTaskDialogCommonButtonssetSet type used to store values from TTaskDialogCommonButton.
TTaskDialogFlagenumerationRepresents options that can be enabled for TTaskDialog.
TTaskDialogFlagssetSet type used to store values from the TTaskDialogFlag enumeration.
TTaskDialogIconenumerationIdentifier for an icon displayed on a Task dialog.
TTaskDlgClickEventprocedure typeSpecifies an event handler signalled when a button is clicked in TCustomTaskDialog / TTaskDialog.
TTaskDlgTimerEventprocedure typeSpecifies an event handler signalled when the timer callback is enabled in a task dialog.

Constants

BitBtnKindToMsgDlgBtnconstantA constant array used to convert the kind of BitButton to the kind of message buttons.
cInputQueryEditSizePercentsconstantInput Query Edit size as a percentage of the monitor width.
cInputQueryEditSizePixelsconstantInput Query Edit size in pixels.
cInputQuerySpacingSizeconstantSpacing between the controls on an Input Query dialog.
DefaultColorDialogOptionsconstantSpecifies the default options enabled in TColorDialog.
DefaultOpenDialogOptionsconstantSet constant with the default Open Dialog options used in TOpenDialog.
mbAbortconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
mbAbortRetryIgnoreconstantA set constant to show an Abort, Retry , Ignore buttons on a message dialog.
mbAllconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
mbCancelconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
mbCloseconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
mbHelpconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
mbIgnoreconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
mbNoconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
mbNoToAllconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
mbOKconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
mbOKCancelconstantA set constant to show an OK and a Cancel button on a message dialog.
mbRetryconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
mbYesconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
mbYesNoconstantA set constant with Yes, No buttons.
mbYesNoCancelconstantA set constant with Yes, No, Cancel buttons.
mbYesToAllconstantAlias to the TMsgDlgBtn enumeration value in system.uitypes.pp.
MsgDlgBtnToBitBtnKindconstantA constant array used to convert the kind of message buttons to the kind of BitButton.
mtConfirmationconstantAlias to the TMsgDlgType enumeration value in system.uitypes.pp.
mtCustomconstantAlias to the TMsgDlgType enumeration value in system.uitypes.pp.
mtErrorconstantAlias to the TMsgDlgType enumeration value in system.uitypes.pp.
mtInformationconstantAlias to the TMsgDlgType enumeration value in system.uitypes.pp.
mtWarningconstantAlias to the TMsgDlgType enumeration value in system.uitypes.pp.
ofExNoPlacesBarconstantMapped to the ofHidePinnedPlaces option in TOpenOptionEx. Maintains code compatibility with older Delphi versions.
PB_DEFMAXconstantNumeric constant which defines the default value for the Max property in a progress bar.
PB_DEFMINconstantNumeric constant which defines the default value for the Min property in a progress bar.
PBST_ERRORconstantNumeric constant used in the Task Dialog API to represent pbsError from the TProgressBarState enumeration.
PBST_NORMALconstantNumeric constant used in the Task Dialog API to represent pbsNormal from the TProgressBarState enumeration.
PBST_PAUSEDconstantNumeric constant used in the Task Dialog API to represent pbsPaused from the TProgressBarState enumeration.
TaskDialogFirstButtonIndexconstantLowest index value for a button identifier used on a task dialog instance.
TaskDialogFirstRadioButtonIndexconstantLowest index value for a radio button used on a TTaskDialog instance.
TDE_CONTENTconstantNumeric constant which identifies the text in the main content area on a task dialog.
TDE_EXPANDED_INFORMATIONconstantNumeric constant which identifies the expandable text for a task dialog.
TDE_FOOTERconstantNumeric constant which identifies the footer text for a task dialog.
TDE_MAIN_INSTRUCTIONconstantNumeric constant which identifies the title in the main content areas on a task dialog.

Variables

MinimumDialogButtonHeightvariableMinimum height for a button on a dialog.
MinimumDialogButtonWidthvariableMinimum width for a button on a dialog.

Uses

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