Equinox Online Help - Language Reference - A to Z

Home

AlertButtons

Applies to
SyntaxAlertButtons [Label1Expression, Label2Expression, Label3Expression, Label4Expression] [, DefaultButton], DisabledButtons
Action[Statement] Sets up the dialog buttons for the Alert dialog.
ScopeUsable anywhere.
Notes

This statement sets up the Alert dialog. Upto four text arguments may be supplied, each of which defines a button on the dialog. If three arguments are supplied then three buttons appear and so on. Each text argument appears on the corresponding button.

The last argument DefaultButton specifies which button will have the focus when the Alert dialog is displayed. If you use this argument, you must include all four preceding commas, even if you don't use all four buttons.

The 'DisbabledButtons' parameter controls which buttons are disabled using a combination of the following numbers.

  • 1 Button 1 Disabled
  • 2 Button 2 Disabled
  • 4 Button 3 Disabled
  • 8 Button 4 Disabled

E.g. to disable buttons 1 & 4, the 'DisbabledButtons' value should be set to 9.

If you omit all arguments, the Alert dialog reverts to a single OK button.

If you try to disable all four alertbuttons (using 15 as the disabled buttons parameter) then buttons 2,3 & 4 are disabled leaving button 1 enabled.

CategoryUser dialogs
See Also Alert, AlertBitmaps, Beep, Edit, HelpAbout, Input, InputPassword, Message, PopupColour_PopupColor, PopupFlags, PopupFont, PopupJustification, PopupSize, PopupTitle, StatusLine
Example

The following method could be attached to an edit button on a form.

AlertButtons "No", "Yes"
Alert "Are you sure you want To edit this record?"

if SysReply = 1 then
Exit Method
else
StartEdit
end if

This example will display a Alert Dialog with four buttons, two of which are disabled:

AlertButtons "Group A", "Group B","Group C","Group D",3,10
Alert "Pick another group"

switch SysReply
case 1
ppgroupa
case 2
ppgroupb
case 3
ppgroupc
case 4
ppgroupd
end switch