MsgBoxEx

Description:

baMsgBoxEx displays a custom MessageBox.

Platforms:

Windows and Macintosh

Usage:

Result = baMsgBoxEx( Message, Caption, Button1, Button2, Button3, Icon, DefButton, Alignment, FontName, FontSize, FontWeight, xPos, yPos )

Arguments:

String, string, string, string, string, string, integer, string, string, integer, integer, integer, integer.
Message is the message to display. This can contain more than one line
Caption is the caption to show in the Title bar
Button1 is the caption of the first button
Button2 is the caption of the second button
Button3 is the caption of the third button
Icon is the type of icon to display. This can be one of the following:
   "Stop"
   "Information"
   "Question"
   "Exclamation"
   "NoIcon"
DefButton is the number of the default (selected) button. Can be 1, 2, or 3 depending on the number of buttons. The button on the left hand side is 1.
Alignment is the alignment of the message text. Can be:
   "left"
   "center"
   "right"
FontName is the name of the font to use
FontSize is the size of the font
FontWeight is the weight of the font, from 1 - 9
xPos is the horizontal position of the dialog
yPos is the vertical position of the dialog

Returns:

String.
Returns the name of the button clicked eg "OK" or "Cancel"

Examples:

Director:
Answer = baMsgBoxEx( "How are you feeling?", "Online Doctor" , "Great", "Just OK", "Lousy", "Question" , 1 , "center", "Arial", 12, 4, 100, 100 )

Authorware:
Answer := baMsgBoxEx( "How are you feeling?", "Online Doctor" , "Great", "Just OK", "Lousy", "Question" , 1 , "center", "Arial", 12, 4, 100, 100 )
 

Notes:

If you do not want to show all buttons, then make the button text for the button you don't want to appear an empty string. On Windows, ff you want to add a keyboard shortcut to a button, then place a & in front of the letter you want it to use. eg "&Later". On Macintosh, you can not assign a keyboard shortcut. The size of the buttons does not change - you are limited to about 12 characters for the buttons.

The font weight is in a range from 1 - 9; 4 is normal, 7 is bold. Not all fonts have all weights. Use 0 if you want to use the standard weight of the font. Under Macintosh, any number greater than 5 will be bold.

The values of the xPos and yPos are relative to the screen. Use -1 to center the dialog on the screen, -2 to center on the Director/Authorware window.
 

See also:

MsgBox
baTaskDialog