My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
TPJVCLMsgDlg  
TPJVCLMsgDlg class description
Updated May 8, 2011 by delphidabbler

TPJVCLMsgDlg

Project: Message Dialog Components.

Unit: PJMessageDialog.

TPJVCLMsgDlg provides a customisable message dialog box that is based on that provided by the Delphi CreateMessageDialog function. The component provides a similar (but extended) interface to the TPJWinMsgDlg component but uses a different method to display the dialog box. This component is recommended when a finer degree of control to that provided by TPJWinMsgDlg is required.

The text displayed in the dialog box is determined by the Text property. Various button groupings can be displayed using the ButtonGroup and/or Buttons properties. Setting a non-zero HelpContext causes a help button to be displayed. The Kind property allows a choice of various standard dialog boxes and icons to be displayed. A user defined icon extracted from a named resource, specified by IconResource can also be displayed. The window title can be customised using the Title property, otherwise a default title is used that is related to the kind of icon being displayed. The MakeSound property determines whether an appropriate system sound is generated when the dialog is displayed. It is possible to set how the dialog box is to be aligned to screen or form using the Align property in combination with the OffsetLeft and OffsetTop properties.

The dialog box can be invoked with the Execute method or an instance of the dialog can be created using the CreateDialog method. In the latter case the user has responsibility for showing and hiding the dialog and destroying the instance.

Methods

Method Description
CreateDialog Creates instance of the dialog box and returns a reference to it.
Execute Displays the dialog box and returns information about the button pressed to close it.

Properties

Property Description
Align Determines the on screen alignment of the dialog box.
ButtonGroup Determines which buttons appear in the dialog box.
Buttons Determines the buttons displayed in the dialog box . Provides finer control than ButtonGroup.
DefButton Determines the default button in the dialog box.
DlgType Permits the buttons and type of dialog box displayed to be specified by means of the flags that are passed to the uType parameter of the Windows MessageBox API function.
HelpContext Specifies the context number for online help.
HelpFile Specifies the file to use for online help.
IconResource Specifies the resource containing the dialog box's icon.
Kind Determines the type of dialog box that is displayed.
MakeSound Flag that determines if a sound will be emitted when the dialog box is displayed.
OffsetLeft Determines the offset of the dialog box from the left of the screen or owning form.
OffsetTop Determines the offset of the dialog box from the top of the screen or owning form.
Options Property that records various customisation options.
Text The text that is displayed in the dialog box.
Title The dialog box's window title.

Events

Event Description
OnHelp Event triggered when a user requests help in a dialog box.
OnHide Event triggered just after the component's dialog box is hidden.
OnShow Event triggered just before the component's dialog box is displayed.


Sign in to add a comment
Powered by Google Project Hosting