TSDLMessageDlg

Declared types and functions

TSDLDlgButton = (dbOK,dbYes,dbNo,dbCancel);
Defines possible buttons in message dialog.
TSDLDlgButtons = set of TSDLDlgButton;
Set of dialog buttons.
TSDLDlgCallBack = procedure(Sender: TSDLForm; Button: TSDLDlgButton)of object;
Callback function that message dialog will call after a button is pressed.
procedure SDLMessageDlg(CallBack: TSDLDlgCallBack; AGui: TSDLObject; Buttons: TSDLDlgButtons; const Cpt,Msg: string);
This function will create an instance of TSDLMessageDlg and execute it with the specified parameters. TSDLMessageDlg will self destruct after it closes.

TSDLMessageDlg

TSDLMessageDlg is a form with a label and specified buttons. Its purpose is to display a message to the user and let him respond over one of the buttons. It is a descendant of TSDLForm. Properties are:

FMessage: TSDLLabel;
Pointer to message label.
FbtOK: TSDLButton;
Pointer to OK button.
FbtYes: TSDLButton;
Pointer to Yes button.
FbtNo: TSDLButton;
Pointer to No button.
FbtCancel: TSDLButton;
Pointer to Cancel button.

There is one new method:

procedure Show(CallBack: TSDLDlgCallBack; Buttons: TSDLDlgButtons; const Cpt,Msg: string);
Executes message dialog setting its caption to Cpt and message label's caption to Msg. It shows only specified buttons which are evenly distributed over its width. When user presses any button Callback function will be called with that button as a parameter.