info.mailtraq.com > Management > Script Functions A-Z > ShowForm() ShowForm()Paints a user defined dialog box centred on the screen of the machine on which Mailtraq is running.
result := ShowForm( width , height , caption , expr )
- width
- Width of the dialog in pixels
- height
- Height of the dialog in pixels
- caption
- Title bar text
- expr
- Expressions painting individual controls (buttons, edit boxes, etc) onto the dialog
- result
- Boolean TRUE if dialog is accepted by the user or Boolean FALSE if cancelled
Define("Show_Dialog",
Do(
result := "FALSE",
ShowForm(350, 240, dlg_1,
Do(
InsertCaption(20, 20, dlg_2, 280, 100, "L"),
InsertCaption(20, 55, $1, 280, 100, "L"),
InsertEdit(20, 70, $2, 300, 25),
InsertCaption(20, 105, $3, 280, 100, "L"),
InsertEdit(20, 120, $4, 300, 0),
InsertButton(100, 170, "&OK", 60, 25, Do(result := "TRUE")),
InsertButton(200, 170, "&Cancel", 60, 25)
)
),
result
)
);
dlg_1 := "Information from Mailtraq";
param_1 := "This is your Domain Name";
param_2 := GetSystemVar("/LocalHost");
param_3 := "This is your smart host";
param_4 := GetSystemVar("/RemoteSMTP");
result := Show_Dialog(param_1, "param_2", param_3, "param_4") |