JVCL Help:MessageDlg@string@string@TGraphic@TMsgDlgButtons@Longint@TDlgCenterKind@Integer@TMsgDlgBtn@TMsgDlgBtn@TMsgDlgBtn@TJvDynControlEngine
JVCL Help: MessageDlg function
Search in JVCL Help
Search in all projectsSummary
MessageDlg replacement with additional settings.
Pascal
run\JvDSADialogs.pas
functionMessageDlg(constMsg: string; constDlgType: TMsgDlgType; constButtons: TMsgDlgButtons; constHelpCtx: Longint; constCenter: TDlgCenterKind = dckScreen; constTimeout: Integer = 0; constDefaultButton: TMsgDlgBtn = mbDefault; constCancelButton: TMsgDlgBtn = mbDefault; constHelpButton: TMsgDlgBtn = mbHelp; constADynControlEngine: TJvDynControlEngine = nil): TModalResult; overload;
functionMessageDlg(constCaption: string; constMsg: string; constDlgType: TMsgDlgType; constButtons: TMsgDlgButtons; constHelpCtx: Longint; constCenter: TDlgCenterKind = dckScreen; constTimeout: Integer = 0; constDefaultButton: TMsgDlgBtn = mbDefault; constCancelButton: TMsgDlgBtn = mbDefault; constHelpButton: TMsgDlgBtn = mbHelp; constADynControlEngine: TJvDynControlEngine = nil): TModalResult; overload;
functionMessageDlg(constCaption: string; constMsg: string; constPicture: TGraphic; constButtons: TMsgDlgButtons; constHelpCtx: Longint; constCenter: TDlgCenterKind = dckScreen; constTimeout: Integer = 0; constDefaultButton: TMsgDlgBtn = mbDefault; constCancelButton: TMsgDlgBtn = mbDefault; constHelpButton: TMsgDlgBtn = mbHelp; constADynControlEngine: TJvDynControlEngine = nil): TModalResult; overload;
Parameters
Parameters | Description |
const Msg: string | Contains the message to display. |
const DlgType: TMsgDlgType | The dialog type. |
const Buttons: TMsgDlgButtons | A list of buttons to display. |
const HelpCtx: Longint | Help context to use when the help button is clicked or F1 is pressed. |
const Center: TDlgCenterKind = dckScreen | Indicates how the dialog is to be centered. The default is to center on the screen, but you can specify to center on the main form or the active form. |
const Timeout: Integer = 0 | Description for this parameter |
const DefaultButton: TMsgDlgBtn = mbDefault | The button to mark as default. If you do not provide a default button, the MessageDlg mechanism is used to determine the default button. |
const CancelButton: TMsgDlgBtn = mbDefault | The button to mark as cancel. If you do not provide a cancel button, the MessageDlg mechanism is used to determine the cancel button. |
const HelpButton: TMsgDlgBtn = mbHelp | The button to mark as help. If you do not provide a help button, the button mbHelp will be used. If such a button does not exist, no button will be marked as help. |
const ADynControlEngine: TJvDynControlEngine = nil | Description for this parameter Result Returns the modal result of the displayed dialog. |
const Caption: string | The caption of the dialog. |
const Picture: TGraphic | A TGraphic descendant of the image to show or nil if no image should be shown. |
Description
- JVCLInfo
MessageDlg is a replacement for the MessageDlg function in Delphi's Dialog unit. It gives you more control over the appearance of the dialog.
In its simplest form, it does exactly the same as the MessageDlg function in Delphi's Dialogs unit, but has three optional parameters that allow you to choose different default, cancel and/or help buttons.
The second form allows you to provide a different caption of the dialog, but otherwise does the same as the first form.
The third form allows you to provide both a different caption as well as a different image.
If you need more control over button captions and results, use MessageDlgEx instead.
See Also
About
Notes
If the user presses Ctrl-C in the dialog, the contents of the dialog is copied to the clipboard.
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page