Constants to define the types of message dialogs. Constants to define possible buttons on a dialog. Set of button messages for dialogs A "set" constant to show a Yes, a No and a Cancel button on a messagedialog. A "set" constant to show a Yes, a No and a Cancel button on a messagedialog. A "set" constant to show a Yes and a No button on a messagedialog. A "set" constant to show a Yes and a No button on a messagedialog. A "set" constant to show an OK and a Cancel button on a messagedialog. A "set" constant to show an OK and a Cancel button on a messagedialog. A "set" constant to show an Abort, a Retry and an Ignore button on a messagedialog. A "set" constant to show an Abort, a Retry and an Ignore button on a messagedialog. A constant array used to convert the kind of message buttons to the kind of BitButton. This array gives you for each possible button type in a messagebox the corresponding kind of BitButton.
For instance MsgDlgBtnToBitBtnKind[mbYes] has the value of bkYes.
It is the reverse of BitBtnKindToMsgDlgBtn.
A constant array used to convert the kind of BitButton to the kind of message buttons. This array gives you for each BitButton the corresponding type of button on a message dialog. For instance BitBtnKindToMsgDlgBtn[bkOK] has the value of mbOK. It is the reverse if MsgDlgBtnToBitBtnKind. The base type from which other dialogs are derived Common Dialog: the base type from which all other dialogs are derived.
Use the "Create" method to make an instance of the dialog,
the "Execute" method to show it to the user
and the "Close" method to release it and free the used resources.
The function that actually takes care of executing the dialog Returns True if the correct exit button was pressed Create a new dialog The owner of the dialog: the component that called it A public method of a dialog showing the appropriate dialog. Use the execute method of a dialog to show it
and then check the result to see if the user made a valid choice and pressed the OK button.
Returns True if the user pressed the OK button Close the dialog and return the memory used the procedure that actually takes care of showing the dialog box The procedure that actually closes the dialog File Dialog File Dialog: allows selection of a file from the current directory. Internal procedure called to execute the dialog. Public method to create a FileDialog. Public method which causes the dialog to be shown. Stringlist which stored the selected files. Specifies the caption of the dialog. Property to set the default file extension for the file dialog box. String property to store the name of the file chosen by the user. A string property which contains possible filters. This is a string which contains the filters a user can choose from.
The available filters and their description are separated by pipe symbols.
To set this property during runtime assign a value like: "All files|*.*|Lazarus Project files|*.lpr"
Integer property setting the used file filter. This property sets which file filter is the default. Set
this porperty to 2 to set the second filter as default.
Set the directory the dialog shows on opening. A list of possible options which can be used in OpenDialog Set of TOpenOption Open Dialog Open Dialog: open a file in the current directory, selected by File Dialog.
If the required file is not in the current directory, another directory can be selected with Select Directory
A protected function which checks if the chosen file meets all requirements. A protected method which calls CheckFile for each selected file. Internal procedure called to execute the dialog. Public method to create a OpenDialog Event triggered when the user changes the folder in the OpenDialog. This event is called when the user changes the folder (directory) in the OpenDialog.
Note: changing the folder will also trigger the OnSelectionChange event.
Event triggered when the user changes the selection made in the OpenDialog. This event is triggered when the user changes the selected file in the OpenDialog.
Note: When the user changes the folder OnSelectionChange will be called first.
Save Dialog Save Dialog: invoked when the application requires to save a file.
If the file is already open or a filename has been specified, then the current buffer is written to that file;
if no file is specified, the Save File As dialog is invoked and the buffer is saved to that file.
Select Directory Dialog Select Directory Dialog: allows the user to select a directory when the directory structure is displayed as a tree. Colour Dialog Colour Dialog: presents a palette of colours to allow the user to select the required colour for text or graphics.
Call the Execute function to show the color dialog.
Internal property to store the value of the chosen color. The method whoch create an instance of the TColorDialog. The caption for the color dialog. You can set the caption of the color dialog by changing this property. A published property which reads en sets the FColor property When the Color dialog has been shown and the user pressed OK, the FColor property contains the chosen color. Colour Button Colour Button: Pressing this button causes the Colour Dialog to be presented, allowing a choice of colour for text or graphics. A set of constants to set the options of a Font dialog. Font Dialog Font Dialog: opens a dialog allowing choice of a font for textual displays A private method which sets the font of the dialog. Public method to create a FontDialog. Specifies the caption of the dialog. Property to store the chosen font. A set of options available from TFontDialogOptions The text displayed in the preview pane of the dialog. As a standard, the preview plane of the dialog
shows all letters both in uppercase and lowercase.
A list of possible options which can be used in Find-dialogs. A list of possible options which can be used in Find-dialogs. If set the "Down" radiobutton is selected. This option will be set when the user presses "Find Next" If set the "Match case" checkbox is hidden from the Find dialog If set the "Whole word" checkbox is hidden from the Find dialog If set the "Up" and "Down" radiobuttons are hidden from the Find dialog This flag is set when the user checks the "Match case" checkbox. If set the "Match case" checkbox is disabled in the Find dialog If set the "Up" and "Down" radiobuttons are disabled in the Find dialog If set the "Whole word" checkbox is disabled in the Find dialog This flag is set if only the first occurence of the search string is to be replaced with the replace string. This flag is set if all occurences of the search string are to be replaced with the replace string. This flag is set when the user checks the "Whole word" checkbox. If set the dialog will display a help button. A set of TFindOption Message Dialog Show a message to the user and receive his response.
There are four versions of this function.
The first version displays a dialog with the standard caption,
the second, third and fourth versions enable you to set the caption.

The third version allows for a Default button;
the fourth version contains a help keyword instead of using context-based help.

If the first 'Caption' argument is missing, no caption is shown on the box.

This is the most complete and elaborate of the message dialogs,
and allows the programmer considerable control over the appearance of the dialog box.

The arguments defining the kind of box and its icon are types rather than integer constants,
and the buttons can be specified as a set in square brackets
eg [mbRetry, mbIgnore, mbAbort, mbCancel].

The HelpCtx argument allows the use of Context Help

The return value from the Function is the identity of the button pressed,
expressed as an integer (see the constant definitions in TControl , [mrNone..mrAll]).
The result of this function is the button the user pressed to close the dialog. The result of this function is the button the user pressed to close the dialog.
This is expresed as an integer
Used to set the caption of the messagedialog. Sets the caption of the messagedialog shown by this function. The message to be shown. The message shown to the user. The type of dialog to be shown The DlgType parameter indicates the type of dialog to show.
You can choose from
mtWarning, mtError, mtInformation, mtConfirmation or mtCustom.
Determines the buttons shown on the messagedialog Buttons indicate which set of button captions have to be shown on the dialog.
You can choose from predefined sets:
mbAbortRetryIgnore,
mbOKCancel,
mbYesNo, mbYesNoCancel,
or you can make your own set.
HelpCtx is used to specify which topic from the help should be shown. HelpCtx is used to specify which topic from the help should be shown. An extended MessageDlg function. This function performs the same function as the MessageDlg function.
It has been extended with parameters to place the dialog on a certain postion on the screen instead of in the centre of the screen.
The MessageDlgPos function does not enable you to choose the caption of the dialog.
The result of this function is the button the user pressed to close the dialog. The result of this function is the button the user pressed to close the dialog. The message to be shown. The message shown to the user. The type of dialog to be shown The DlgType parameter indicates the type of dialog to show.
You can choose from
mtWarning, mtError, mtInformation, mtConfirmation or mtCustom.
Determines the buttons shown on the messagedialog Buttons indicate which buttons have to be shown on the dialog.
You can choose from predefined sets:
mbAbortRetryIgnore,
mbOKCancel,
mbYesNo,
mbYesNoCancel,
or you can make your own set.
HelpCtx is used to specify which topic from the help should be shown. HelpCtx is used to specify which topic from the help should be shown. X specifies the position of the left side of the dialog X specifies the position of the left side of the dialog. Y specifies the position of the top side of the dialog Y specifies the position of the top side of the dialog An extended MessageDlgPos function. This function enables you to specify a Helpfile which has to be shown when the user presses F1. The result of this function is the button the user pressed to close the dialog. The result of this function is the button the user pressed to close the dialog. The message to be shown. The message shown to the user. The type of dialog to be shown The DlgType parameter indicates the type of dialog to show.
You can choose from
mtWarning, mtError, mtInformation, mtConfirmation or mtCustom.
Determines the buttons shown on the messagedialog Buttons indicate which buttons have to be shown on the dialog.
You can choose from predefined sets:
mbAbortRetryIgnore,
mbOKCancel,
mbYesNo,
mbYesNoCancel,
or you can make your own set.
HelpCtx is used to specify which topic from the help should be shown. HelpCtx is used to specify which topic from the help should be shown. X specifies the position of the left side of the dialog X specifies the position of the left side of the dialog Y specifies the position of the top side of the dialog Y specifies the position of the top side of the dialog The Helpfile that has to be shown when the user presses F1 The name of the helpfile to be shown when the user presses F1 in the dialog. Show a question to the user and get a response QuestionDlg has the same functionality as MessageDlg
except for the parameter Buttons which is of a different type.
You can define your own captions and return values of this function.

Buttons is a list of TModalResult (defined as constants [mrNone..MrYesToAll] in ) and strings.
For each TModalResult a button is created.
To set a custom caption, add a string after a button.

The default TModalResults defined in controls.pp (mrNone..mrLast)
doesn't need a caption. The default captions will be used.
The result of this function is the button the user pressed to close the dialog. The result of this function is the button the user pressed to close the dialog. Used to set the caption of the question dialog. Set the caption of the question dialog shown by this function. The question to be shown. The question the user has to answer. The type of dialog to be shown in fact which icon will be shown. An array of return values and caption for the buttons on the question dialog. Buttons is defined as a array of const.
This means you can define any number of buttons to be shown.
If your array consists of only predefined return values like mrOK and mrCancel,
the standard OK and Cancel buttons will be shown.

The strength of this function is however that you can fill the array like:
[400, 'Yes!!!', 401, 'Are you mad?', 402, 'My mistake'],
which will create a dialog with three buttons;
the captions of the buttons will be the strings given in the array.
The return value of the function will be 400, 401 or 402,
depending on whether the user clicked the 'Yes!!!', the 'Are you mad?' or the 'My mistake' button.
HelpCtx is used to specify which topic from the help should be shown. HelpCtx is used to specify which topic from the help should be shown. Show Message Procedure ShowMessage (const Msg: string);
The simplest message dialog: takes a simple string as argument,
displays it in a stereotyped box,
and waits for a mouse-click or enter-key event
before returning to the calling routine or program.

This is a modal procedure call,
that is the box is displayed, receives focus,
and does not relinquish focus until the OK box is clicked or otherwise selected.

A string constant containing the message to be shown. A string constant containing the message to be shown. Shows a message assembled from a format string and an array of arguments. This procedure is an extension to the ShowMessage procedure. The parameters it takes are the same as the Format function. The format string The parameters to be inserted in the message. Shows a message box at a given screen position. Shows a message box at a given screen position. A string constant which is the message to ne shown. The horizontal position of the messagebox. The vertical position of the messagebox. Use InputQuery to show a dialog box to get some input from the user

Two versions of this function which displays a prompt and expects user input of textual data;

The first includes a MaskInput boolean argument
which determines whether the user input is masked out by asterisks in the text-input box
(like during entry of a password),
the second omits this property.

The text entered by the user is returned in the variable argument 'Value'. The function result is a boolean which returns TRUE if the OK button was pressed, or FALSE if the box was closed by any other mechanism (such as clicking the 'Close' icon on the top title bar).

Omitting the MaskInput argument is equivalent to setting it FALSE.

Returns True of OK button was pressed, False if Cancel was pressed or abnormal exit Result is True if the user pressed OK or hit RETURN in the dialog box. If the user pressed Cancel or the dialog was closed without pressing a button the result will be false. The caption for the dialogbox The text asking the user for his input. Determines if the dialog shows *s or the actual input. Set MaskInput to true if you want to hide the input and display asterisks. The value the user entered. When the DialogBox is shown the text in the Editbox will be Value.
This string can be altered or amended by the user.
When ENTER is pressed or OK clicked, Value will be the (possibly amended) text from the Editbox.
Displays a box with defined title and prompt, and expects user input in a text box

. A default string can optionally be displayed in the text box. The user-entered or default string is returned as the function result.

If the user selects the OK button, the text in the text box is returned. If the user selects the Cancel button, the default string is returned.

The result of this function is the string the user entered in the editbox or the default string . The caption for the dialogbox . The text asking the user for his input . Default value for dialog box The value of the editbox in the dialog will have this value. Password Box PasswordBox: a specialised form of the InputQuery.
The editbox on the dialog box will mask the input.
The only parameters are aCaption and aPrompt.
Behaves very similarly to the InputQuery function with MaskInput = TRUE;
the difference is that the password that was typed in is returned as the result of the function (like InputBox).
The string the user entered. The caption for the dialog A prompt to ask for the users input. A function that allows to user to select a directory. This function will show a dialog which allows the user to select the required directory when the directory structure is displayed as a tree.
Under Windows the caption from the resulting dialog cannot be set, but the label above the directory tree will have this value.
There are two version of this function, the second one having the ability to indicate whether hidden folders should be shown as well.
A boolean indicating if the user pressed OK. A boolean indicating if the user selected a directory and pressed OK. A constant which sets the caption of the shown dialog. A constant which sets the caption of the shown dialog. The directory the dialog should start in. The directory the dialog should start in.
If a valid directory is given, the selected directory in the tree will be set to this directory.
A variable which on exit contains the selected directory. A variable which on exit contains the selected directory. A boolean constant indicating whether hidden folders should be shown too. A boolean constant indicating whether hidden folders should be shown too. Register the components used in the current application, so that they can be recognised A dialog used for finding text within the current editor or text buffer Opens a dialog box allowing the user to enter text for searching, for example in a text editor.
As TFindDialog is the parent class for the TReplaceDialog,
it contains definitions for the Replace method,
but the Replace option does not actually appear when the dialog is displayed:
you need to use TReplaceDialog to do that
A dialog allowing the user to replace text The dialog appears and offers boxes for the user to enter text for searching and text to replace it,
for example while editing a file or large piece of text.
A number of buttons appear, offering the choice to replace this instance, find next, replace all