ALERT

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.0 (Modified)


ALERT (message{; ok button title})

ParameterTypeDescription
messageStringMessage to display in the alert dialog box
ok button titleStringOK button title

Description

The ALERT command displays an alert dialog box composed of a note icon, a message, and an OK button.

You pass the message to be displayed in the parameter message. This message can be up to 255 characters long. However, if the message does not fit into the message area, it can appear truncated, depending on its length and the width of the characters.

By default, the title of the OK button is "OK." To change the title of the OK button, pass the new custom title into the optional parameter ok button title. If necessary, the OK button width is resized toward the left, according to the width of the custom title you pass.

Tip: Do not call the ALERT command from the section of a form or object method that handles the On Activate or On Deactivate form events; this will cause an endless loop.

Examples

1. This example displays an alert showing information about a company. Note that the displayed string contains carriage returns, which cause the string to wrap to the next line:

   ALERT("Company: "+[Companies]Name+Char(13)+"People in company: "+
                  String(Records in selection([People]))+Char(13)+"Number of parts they supply: "+
                  String (Records in selection([Parts])))

This line of code displays the following alert box (on Windows):

2. The line:

   ALERT("I'm sorry Dave, I can't do that.";"Alas!")

displays the alert dialog box (on Windows) shown:

3. The line:

   ALERT("You no longer have the access privileges for deleting these records.";"Well, I swear I did not know that")

displays the alert dialog box (on Windows) shown:

See Also

CONFIRM, DISPLAY NOTIFICATION, Request.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next