DIALOG (Short Name: DIA)
Top  Previous  Next

Use the DIALOG command to display a dialog box on the screen to accept text entry from a user.

dialog

Options

'message'
Specifies the text of the message to display in the dialog box.

||format
Also known as EditMask. You can apply the mask specified by the EditMask parameter to the text string specified by the Value parameter. See the "||format" subchapter for more.

=w
Specifies the wrap width for the dialog box message.

response
Specifies the variable that will contain the dialog box entry.

=w
Specifies the width for the dialog box entry.

endkey
Specifies the variable containing the final keystroke ([Enter] or [Esc]) in a dialog box.

lines
Specifies the number of lines to display for the text entry in a dialog box.

password
Displays the dialog box entry as asterisks.

YES
Creates a Yes/No dialog box and sets the default response to Yes.

NO
Creates a Yes/No dialog box and sets the default response to No.

CAPTION 'message'
Specifies the text of the message to display in the dialog box caption.

ICON
value

values:  
 
·APPS  
·ATTENTION  
·CONFIRM  
·ERROR  
·HELP  
·INFO  
·QUESTION  
·SERIOUS  
·STOP  
·WARNING  
·WINDOWS  


OPTION parameters

This parameter can be used to change the "look and feel" of DIALOG window. All parameters and values must be separated by the "|" (pipe) symbol. The following parameters are supported for the DIALOG command::


ICON_FILE value  
 
Specifies the external path and image name for the icon for DIALOG window.  
 
WINDOW_CAPTION value  
 
To customize window caption. Supported values:  
 
·OFF - makes window caption invisible  
·SMALL - makes window caption small (tool window)  
 
WINDOW_BACK_COLOR value  
 
To change background color of TITLE area. User can specify the integer value or type one of the predefined color names:  
 
·AQUA  
·BLACK  
·BLUE  
·CREAM  
·DARK GRAY  
·FUCHSIA  
·GRAY  
·GREEN  
·LIME  
·LIGHT GRAY  
·MAROON  
·MEDIUM GRAY  
·MINT GREEN  
·NAVY  
·OLIVE  
·PURPLE  
·RED  
·SILVER  
·SKY BLUE  
·TEAL  
·WHITE  
·YELLOW  
 
TITLE_FONT_COLOR value  
 
To change font color of TITLE area. User can specify the integer value or type one of the predefined color names:  
 
·AQUA  
·BLACK  
·BLUE  
·CREAM  
·DARK GRAY  
·FUCHSIA  
·GRAY  
·GREEN  
·LIME  
·LIGHT GRAY  
·MAROON  
·MEDIUM GRAY  
·MINT GREEN  
·NAVY  
·OLIVE  
·PURPLE  
·RED  
·SILVER  
·SKY BLUE  
·TEAL  
·WHITE  
·YELLOW  
 
TITLE_BACK_COLOR value  
 
To change the background color of TITLE area. User can specify the integer value or type one of the predefined color names:  
 
·AQUA  
·BLACK  
·BLUE  
·CREAM  
·DARK GRAY  
·FUCHSIA  
·GRAY  
·GREEN  
·LIME  
·LIGHT GRAY  
·MAROON  
·MEDIUM GRAY  
·MINT GREEN  
·NAVY  
·OLIVE  
·PURPLE  
·RED  
·SILVER  
·SKY BLUE  
·TEAL  
·WHITE  
·YELLOW  
 
TITLE_BOLD value  
 
Makes font in the TITLE area bold style. Values:  
 
·ON  
·OFF  
 
TITLE_ITALIC value  
 
Changes font in the TITLE area italic style. Values:  
 
·ON  
·OFF  
 
TITLE_UNDERLINE value  
 
Changes font in the TITLE area underlined. Values:  
 
·ON  
·OFF  
 
TITLE_STRIKEOUT value  
 
Makes font in the TITLE area strikeout. Values:  
 
·ON  
·OFF  
 
TITLE_FONT_NAME value  
 
Specifies a font name in the TITLE area.  
 
TITLE_FONT_SIZE value  
 
Specifies a font size (Integer value) in the TITLE area.  
 
MESSAGE_FONT_COLOR value  
 
Changes the font color of message area. User can specify the integer value or type one of the predefined color names:  
 
·AQUA  
·BLACK  
·BLUE  
·CREAM  
·DARK GRAY  
·FUCHSIA  
·GRAY  
·GREEN  
·LIME  
·LIGHT GRAY  
·MAROON  
·MEDIUM GRAY  
·MINT GREEN  
·NAVY  
·OLIVE  
·PURPLE  
·RED  
·SILVER  
·SKY BLUE  
·TEAL  
·WHITE  
·YELLOW  
 
MESSAGE_BACK_COLOR value  
 
Changes the background color of message area. User can specify the integer value or type one of the predefined color names:  
 
·AQUA  
·BLACK  
·BLUE  
·CREAM  
·DARK GRAY  
·FUCHSIA  
·GRAY  
·GREEN  
·LIME  
·LIGHT GRAY  
·MAROON  
·MEDIUM GRAY  
·MINT GREEN  
·NAVY  
·OLIVE  
·PURPLE  
·RED  
·SILVER  
·Page 15 of 28  
·SKY BLUE  
·TEAL  
·WHITE  
·YELLOW  
 
MESSAGE_BOLD value  
 
Makes font in the message area bold style. Values:  
 
·ON  
·OFF  
 
MESSAGE_ITALIC value  
 
Makes font in the message area italic style. Values:  
 
·ON  
·OFF  
 
MESSAGE_UNDERLINE value  
 
Makes font in the message area underlined. Values:  
 
·ON  
·OFF  
 
MESSAGE_STRIKEOUT value  
 
Makes font in the message area strikeout. Values:  
 
·ON  
·OFF  
 
MESSAGE_FONT_NAME value  
 
Specifies a font name in the message area.  
 
MESSAGE_FONT_SIZE value  
 
Specifies a font size (Integer value) in the message area.  
 
BUTTON_OK_CAPTION value  
 
Specifies the text for the OK button.  
 
BUTTON_OK_FONT_COLOR value  
 
Specifies the font color for OK button.  
 
BUTTON_OK_BACK_COLOR value  
 
Specifies the background color for OK button.  
 
BUTTON_YES_BACK_COLOR value  
 
Specifies the background color for YES button.  
 
BUTTON_YES_COLOR value  
 
Specifies the color for YES button.  
 
BUTTON_OK_COLOR value  
 
Specifies the color for OK button.  
 
BUTTON_OK_FONT_BOLD value  
 
Specifies the bold font for OK button. Values:  
 
·ON  
·OFF  
 
BUTTON_OK_FONT_ITALIC value  
 
Specifies the italic font for OK button. Values:  
 
·ON  
·OFF  
 
BUTTON_OK_FONT_UNDERLINE value  
 
Specifies the underline font for OK button. Values:  
 
·ON  
·OFF  
 
BUTTON_OK_FONT_STRIKEOUT value  
 
Specifies the strike out font for OK button. Values:  
 
·ON  
·OFF  
 
BUTTON_OK_FONT_NAME value  
 
Specifies the font name for OK button.  
 
BUTTON_OK_FONT_SIZE value  
 
Specifies the font size for OK button.  
 
BUTTON_CANCEL_CAPTION value  
 
Specifies the text for the Cancel button.  
 
BUTTON_CANCEL_FONT_COLOR value  
 
Specifies the font color for the Cancel button.  
 
BUTTON_NO_BACK_COLOR value  
 
Specifies the background color for NO button.  
 
BUTTON_NO_COLOR value  
 
Specifies the color for NO button.  
 
BUTTON_CANCEL_BACK_COLOR value  
 
Specifies the background color for Cancel button.  
 
BUTTON_CANCEL_COLOR value  
 
Specifies the color for Cancel button.  
 
BUTTON_CANCEL_FONT_BOLD value  
 
Specifies the bold font for Cancel button. Values:  
 
·ON  
·OFF  
 
BUTTON_CANCEL_FONT_ITALIC value  
 
Specifies the italic font for Cancel button. Values:  
 
·ON  
·OFF  
 
BUTTON_CANCEL_FONT_UNDERLINE value  
 
Specifies the underline font for Cancel button. Values:  
 
·ON  
·OFF  
 
BUTTON_CANCEL_FONT_STRIKEOUT value  
 
Specifies the strike out font for Cancel button. Values:  
 
·ON  
·OFF  
 
BUTTON_CANCEL_FONT_NAME value  
 
Specifies the font name for Cancel button.  
 
BUTTON_CANCEL_FONT_SIZE value  
 
Specifies the font size for Cancel button.  
 
BUTTONS_FONT_SIZE value  
 
Specifies the font size for button.  
 
BUTTONS_SHOW_GLYPH value  
 
If ON, turns on images on OK and Cancel buttons.  
 
BUTTONS_BACK_COLOR value  
 
Specifies the background color for button.  
 
BUTTON_YES_CAPTION value  
 
Specifies the text for the Yes button.  
 
BUTTON_YES_FONT_SIZE value  
 
Specifies the font size for Yes button.  
 
BUTTON_YES_FONT_COLOR value  
 
Specifies the font color for Yes button.  
 
BUTTON_YES_COLOR value  
 
Specifies the color for Yes button.  
 
BUTTON_NO_CAPTION value  
 
Specifies the text for the No button.  
 
BUTTON_NO_FONT_SIZE value  
 
Specifies the font size for No button.  
 
BUTTON_NO_FONT_COLOR value  
 
Specifies the font color for No button.  
 
BUTTON_NO_COLOR value  
 
Specifies the color for No button.  
 
TRANSPARENCY value  
 
Set transparency to specify that the choose form represents a layered window that allows a translucent color. The transparency value specifies the degree of translucency. Values:  
 
0 - 255  
 
THEMENAME values  
 
Specifies a theme for the entire DIALOG window. Values:  
 
·Deep Cyan  
·Deep Green  
·Deep Orange  
·Diamond Blue  
·Diamond Green  
·Funny Theme  
·Gnome  
·Green Glass  
·Longhorn  
·Mac OS  
·Matrix  
·Media  
·One Blue  
·One Clear Blue  
·One Cyan  
·One Green  
·One Orange  
·Orange Glass  
·R:BASE Rocks!  
·Razzmatazz  
·Real One  
·Sports Black  
·Sports Blue  
·Sports Cyan  
·Sports Green  
·Sports Orange  
·Steel Black  
·Steel Blue  
·Win Native  
·XP Blue  
·XP Egypt  
·XP Green  
·XP Grey Scale  
·XP Orange  
·XP Silver  
 
**All previously defined DIALOG commands which are redefined to use Themes should be thoroughly checked prior to putting into production as objects and text may look substantially different.  
 
DIALOG_EDIT_HINT value  
 
Specifies the hint when you hover your mouse cursor over the dialog edit box, the hint is displayed. Very useful feature to provide hint, such as "Double-Click Here for a List of Customers ..."  
 
AUTOSELECT value  
 
Enables the option to select the entire value within the field. Values:  
 
·TRUE  
·FALSE  
 
POPUP_ENABLED value  
 
Enables the option of bringing up the custom pop-up menus when using the double-click. Values:  
 
·ON  
·OFF (default)  
 
MULTISELECT value  
 
Enables the option to select the multiple values within a POPUP. Values:  
 
·TRUE  
·FALSE  
 
POPUP_TITLE_FONT_NAME value  
 
Specifies the font name for custom pop-up title.  
 
POPUP_TITLE_FONT_SIZE value  
 
Specifies the font size for custom pop-up title.  
 
POPUP_TITLE_FONT_COLOR value  
 
Specifies the font color for custom pop-up title.  
 
POPUP_TITLE_FONT_BOLD value  
 
Specifies the bold font for custom pop-up title. Values:  
 
·ON  
·OFF  
 
POPUP_TITLE_FONT_ITALIC value  
 
Specifies the italic font for custom pop-up title. Values:  
 
·ON  
·OFF  
 
POPUP_TITLE_FONT_UNDERLINE value  
 
Specifies the underline font for custom pop-up title. Values:  
 
·ON  
·OFF  
 
POPUP_TITLE_FONT_STRIKEOUT value  
 
Specifies the strike out font for custom pop-up title. Values:  
 
·ON  
·OFF  
 
POPUP_TITLE_TEXT value  
 
Specifies the text for custom pop-up title.  
 
POPUP_TITLE_BACK_COLOR value  
 
Specifies the background color for custom pop-up title.  
 
POPUP_LIST_FONT_NAME value  
 
Specifies the font name for custom pop-up list items.  
 
POPUP_LIST_FONT_SIZE value  
 
Specifies the font size for custom pop-up list items.  
 
POPUP_LIST_FONT_COLOR value  
 
Specifies the font color for custom pop-up list items.  
 
POPUP_LIST_FONT_BOLD value  
 
Specifies the bold font for custom pop-up list items. Values:  
 
·ON  
·OFF  
 
POPUP_LIST_FONT_ITALIC value  
 
Specifies the italic font for custom pop-up list items. Values:  
 
·ON  
·OFF  
 
POPUP_LIST_FONT_UNDERLINE value  
Specifies the underline font for custom pop-up list items. Values:  
 
·ON  
·OFF  
 
POPUP_LIST_FONT_STRIKEOUT value  
 
Specifies the strike out font for custom pop-up list items. Values:  
 
·ON  
·OFF  
 
POPUP_LIST_BACK_COLOR value  
 
Specifies the background color for custom pop-up list items.  
 
POPUP_CAPTION value  
 
Specifies the text for custom pop-up windows caption.  
 
POPUP_TABLE value  
 
Specifies the Table/View Name for Pop-up Menus  
 
POPUP_RETURN_COLUMN value  
 
Specifies the Column Returned for Pop-up Menus  
 
POPUP_SELECT value  
 
Specifies the SELECT clause for Pop-up Menu Values  
 
POPUP_WHERE value  
 
Specifies the WHERE clause for Pop-up Menus Values  
 
POPUP_SHOW_LINES value  
 
Specifies the option to Show Lines between selected columns for Pop-up Menus. Values:  
 
·TRUE  
·FALSE  
 
POPUP_DISTINCT value  
 
Specifies the option to display Distinct Values for selected columns for Pop-up Menus. Values:  
 
·TRUE  
·FALSE  
 
POPUP_RETURN_TYPE value  
Specifies the option to return either the selected item in Pop-up Menu or the value of Popup Return Column. Values:  
 
·VALUE  
·COLUMN  
 
POPUP_LINES value  
 
Specifies the number of visible lines to be displayed for list items  
 
 
POPUP_DIALOG_TYPE value  
Specifies the Pop-up type when double-clicking on the DIALOG box. Values:  
 
·LOOKUP  
·DATE  
·TIME  
·DATETIME  
·CALCULATOR  
 
POPUP_CLOCK_BACK_COLOR value  
 
Specifies the background color of the clock when POPUP_DIALOG_TYPE is specified as TIME or DATETIME.  
 
POPUP_CLOCK_FACE_COLOR value  
 
Specifies the face color of the clock when POPUP_DIALOG_TYPE is specified as TIME or DATETIME.  
 
POPUP_CLOCK_HANDS_COLOR value  
 
Specifies the color of the clock's hands when POPUP_DIALOG_TYPE is specified as TIME or DATETIME.  
 
POPUP_CLOCK_NUMBERS_COLOR value  
 
Specifies the color of the clock's numbers when POPUP_DIALOG_TYPE is specified as TIME or DATETIME.  
 
POPUP_CLOCK_HOURTICKS_COLOR value  
 
Specifies the color of the clock's hour ticks when POPUP_DIALOG_TYPE is specified as TIME or DATETIME.  
 
POPUP_CLOCK_MINUTETICKS_COLOR value  
 
Specifies the color of the clock's minute ticks when POPUP_DIALOG_TYPE is specified as TIME or DATETIME.  
 
POPUP_CALENDAR_BACK_COLOR value  
 
Specifies the background color of the calendar when POPUP_DIALOG_TYPE is specified as DATE or DATETIME.  
 
POPUP_CALENDAR_DAYS_COLOR value  
 
Specifies the color of the calendar days when POPUP_DIALOG_TYPE is specified as DATE or DATETIME.  
 
POPUP_CALENDAR_FILLDAYS_COLOR value  
 
Specifies the color of the calendar fill days when POPUP_DIALOG_TYPE is specified as DATE or DATETIME.  
 
POPUP_CALENDAR_DAYSOFWEEK_COLOR value  
 
Specifies the color of the calendar days of week when POPUP_DIALOG_TYPE is specified as DATE or DATETIME.  
 
POPUP_CALENDAR_LINES_COLOR value  
 
Specifies the color of the calendar lines when POPUP_DIALOG_TYPE is specified as DATE or DATETIME.  
 
POPUP_CALENDAR_SELBACK_COLOR value  
 
Specifies the color of the selected date background when POPUP_DIALOG_TYPE is specified as DATE or DATETIME.  
 
POPUP_CALENDAR_SELFORE_COLOR value  
 
Specifies the color of the selected date foreground when POPUP_DIALOG_TYPE is specified as DATE or DATETIME.  
 
POPUP_CALENDAR_TODAYFRAME_COLOR value  
 
Specifies the color of today's frame when POPUP_DIALOG_TYPE is specified as DATE or DATETIME.  
 

Examples


Example 01: (Dialog with Typical OK/CANCEL OPTIONS)

CLS
DIALOG 'Enter Last Name' vLastName=26 vEndKey 1 +
CAPTION 'Search Employee by Last Name' +
ICON APP +
OPTION TITLE_FONT_COLOR BLACK +
|TITLE_BACK_COLOR WHITE +
|TRANSPARENCY 255 +
|WINDOW_BACK_COLOR WHITE +
|BUTTON_OK_CAPTION &Search +
|BUTTON_CANCEL_CAPTION &Cancel

dialog_01


Example 02: (Dialog with Typical OK/CANCEL and PASSWORD OPTION)

CLS
DIALOG 'Enter Password' vPassword=26 vEndKey PASSWORD +
CAPTION 'Database Maintenance' +
ICON APP +
OPTION TITLE_FONT_COLOR BLACK +
|TITLE_BACK_COLOR WHITE +
|TRANSPARENCY 255 +
|WINDOW_BACK_COLOR WHITE +
|BUTTON_OK_CAPTION &Process +
|BUTTON_CANCEL_CAPTION &Cancel

dialog_02


Example 03:
(Dialog with Multi-Line Message)

-- (CHAR(009)) = Tab Key (Indent)
-- (CHAR(013)) = Carriage Return
CLS
SET VAR vMsg = +
('Line 1:'+(CHAR(009))+(CHAR(009))&'Contents of Line 1'+(CHAR(013))+ +
 'Line 2:'+(CHAR(009))+(CHAR(009))&'Contents of Line 2'+(CHAR(013))+ +
 'Line 3:'+(CHAR(009))+(CHAR(009))&'Contents of Line 3'+(CHAR(013))+ +
 'Line 4:'+(CHAR(009))+(CHAR(009))&'Contents of Line 4'+(CHAR(013))+ +
 'Line 5:'+(CHAR(009))+(CHAR(009))&'Contents of Line 5'+(CHAR(013))+ +
 'Line 6:'+(CHAR(009))+(CHAR(009))&'Contents of Line 6'+(CHAR(013))+ +
 'Line 7:'+(CHAR(009))+(CHAR(009))&'Contents of Line 7'+(CHAR(013))+ +
 'Line 8:'+(CHAR(009))+(CHAR(009))&'Contents of Line 8'+(CHAR(013))+ +
 'Line 9:'+(CHAR(009))+(CHAR(009))&'Contents of Line 9'++(CHAR(013)))
DIALOG .vMsg vYesNo vEndKey YES +
CAPTION ' Your Dialog Caption Here ...' +
ICON APP +
OPTION TITLE_FONT_COLOR BLACK +
|TITLE_BACK_COLOR WHITE +
|TRANSPARENCY 255 +
|WINDOW_BACK_COLOR WHITE +
|BUTTON_YES_CAPTION &Start +
|BUTTON_NO_CAPTION &Cancel +
|BUTTON_YES_COLOR GREEN +
|BUTTON_NO_COLOR RED +
|BUTTON_YES_FONT_COLOR WHITE +
|BUTTON_NO_FONT_COLOR WHITE


dialog_03

Example 04: (Another Simple Dialog)

CLS
SET VAR vResponse TEXT = NULL
SET VAR vEndKey TEXT = NULL
DIALOG 'DIALOG Message Here ...' vResponse=26 vEndKey 1 +
CAPTION 'DIALOG Caption Here ...' ICON APPS +
OPTION TITLE_FONT_COLOR GREEN +
|TITLE_BACK_COLOR WHITE +
|TITLE_FONT_NAME ARIAL +
|TITLE_BOLD OFF +
|WINDOW_BACK_COLOR WHITE +
|BUTTON_YES_CAPTION &Continue +
|BUTTON_NO_CAPTION C&ancel +
|BUTTON_YES_COLOR WHITE +
|BUTTON_NO_COLOR WHITE +
|BUTTON_YES_FONT_COLOR GREEN +
|BUTTON_NO_FONT_COLOR RED

dialog_04

Example 05:


CLS
SET VAR vResponse TEXT = NULL
SET VAR vEndKey TEXT = NULL
DIALOG 'DIALOG Message Here ...' vResponse=26 vEndKey 1 +
CAPTION 'DIALOG Caption Here ...' ICON APPS +
OPTION TITLE_FONT_COLOR GREEN +
|TITLE_BACK_COLOR WHITE +
|TITLE_FONT_NAME ARIAL +
|TITLE_BOLD OFF +
|WINDOW_BACK_COLOR WHITE +
|BUTTON_OK_CAPTION &Continue +
|BUTTON_CANCEL_CAPTION C&ancel +
|BUTTON_YES_COLOR WHITE +
|BUTTON_NO_COLOR WHITE +
|BUTTON_YES_FONT_COLOR GREEN +
|BUTTON_NO_FONT_COLOR RED +
|BUTTONS_SHOW_GLYPH ON

dialog_05
Example 06:

CLS
DIALOG 'DIALOG Message Here ...' vResponse=26 vEndKey 1 +
CAPTION 'DIALOG Caption Here ...' ICON APPS +
OPTION TITLE_FONT_COLOR GREEN +
|TITLE_BACK_COLOR WHITE +
|TITLE_FONT_NAME ARIAL +
|TITLE_BOLD OFF +
|WINDOW_BACK_COLOR WHITE +
|BUTTON_OK_CAPTION &Continue +
|BUTTON_CANCEL_CAPTION C&ancel +
|BUTTONS_BACK_COLOR WHITE +
|BUTTON_FONT_COLOR GREEN

dialog_06


Example 07: (Small Caption Window)

CLS
DIALOG 'DIALOG Message Here ...' vResponse=26 vEndKey 1 +
CAPTION 'DIALOG Caption Here ...' ICON APPS +
OPTION TITLE_FONT_COLOR GREEN +
|WINDOW_CAPTION SMALL +
|TITLE_BACK_COLOR WHITE +
|TITLE_FONT_NAME ARIAL +
|TITLE_BOLD OFF +
|WINDOW_BACK_COLOR WHITE +
|BUTTON_OK_CAPTION &Continue +
|BUTTON_CANCEL_CAPTION C&ancel +
|BUTTONS_BACK_COLOR WHITE +
|BUTTON_FONT_COLOR GREEN


dialog_07

Example 08: (No Caption Window)

CLS
DIALOG 'DIALOG Message Here ...' vResponse=26 vEndKey 1 +
CAPTION 'DIALOG Caption Here ...' ICON APPS +
OPTION TITLE_FONT_COLOR GREEN +
|WINDOW_CAPTION OFF +
|TITLE_BACK_COLOR WHITE +
|TITLE_FONT_NAME ARIAL +
|TITLE_BOLD OFF +
|WINDOW_BACK_COLOR WHITE +
|BUTTON_OK_CAPTION &Continue +
|BUTTON_CANCEL_CAPTION C&ancel +
|BUTTONS_BACK_COLOR WHITE +
|BUTTON_FONT_COLOR GREEN

dialog_08


Example 09: Dialog window using themes

DIALOG 'DIALOG Message Here ...' vResponse=26 vEndKey 1 CAPTION 'DIALOG Caption Here ...' ICON APPS OPTION themename longhorn

dialogtheme