Xbasic

UI_HTML_MSG_BOX Function

IN THIS PAGE

Syntax

Response_Code as N = ui_html_msg_box(C title ,C html_message [,N box_style [,N width [,N height [,L inset [,L UseWin3DBg [,C width_units [,C height_units [,C dlg_bg_color ]]]]]]]])

Arguments

titleCharacter

The title of the dialog box.

html_messageCharacter

The message to display. The message can contain HTML markup.

box_styleNumeric

Default = UI_OK + UI_NO_SYMBOL. You form this message box variation by adding the values as you need from as many of the following groups in the format: value1 + value2 + value3.

Value1
Button Combination
Description
UI_OK

OK button (default)

UI_OK_CANCEL

OK and Cancel buttons

UI_ABORT_RETRY_IGNORE

Abort, Retry, and Ignore buttons

UI_YES_NO_CANCEL

Yes, No, and Cancel buttons

UI_YES_NO

Yes and No buttons

UI_RETRY_CANCEL

Retry and Cancel buttons

Value2
Symbol Type
Description
UI_NO_SYMBOL

No symbol (default)

UI_STOP_SYMBOL

Stop symbol

UI_QUESTION_SYMBOL

Question symbol

UI_ATTENTION_SYMBOL

Attention symbol

UI_INFORMATION_SYMBOL

Information symbol

Value3
Default Button
Description
UI_FIRST_BUTTON_DEFAULT

First button is the default

UI_SECOND_BUTTON_DEFAULT

Second button is the default

UI_THIRD_BUTTON_DEFAULT

Third button is the default

widthNumeric

Default = 2. The width of the HTML component in Horizontal_Units.

heightNumeric

Default = 1. The height of the HTML component in Vertical_Units.

insetLogical

Default = .F.. If .F., the box containing the message has no border. If .T., an inset border is applied to the box containing the HTML message.

UseWin3DBgLogical

Default = .T.. If .T., use Win3D color for HTML component's background. If .F., allow the HTML component to set its background color

width_unitsCharacter

Default = "inches". The unit of measurement for width. The options are:

  • "inches"
  • "cm"
  • "characters"
height_unitsCharacter

Default = "inches". The unit of measurement for height. The options are:

  • "inches"
  • "cm"
  • "characters"
dlg_bg_colorCharacter

Default = "Win3D". The color of the background.

Returns

Response_CodeNumeric

Returns a value indicating which button was clicked.

Value
Description
UI_CANCEL_SELECTED

Cancel button selected.

UI_OK_SELECTED

OK button selected.

UI_RETRY_SELECTED

Retry button selected.

UI_YES_SELECTED

Yes button selected.

UI_NO_SELECTED

No button selected.

UI_ABORT_SELECTED

Abort button selected.

UI_IGNORE_SELECTED

Ignore button selected.

Description

Display a message box that supports HTML text. Width and Height are in inches by default.

Discussion

The UI_HTML_MSG_BOX() function displays a message box that includes a window that may contain any HTML content.

Symbol Images

images/icon_stop.gif
Stop symbol. Image used if UI_STOP_SYMBOL is specified.
images/icon_question.gif
Question symbol. Image used if UI_QUESTION_SYMBOL is specified.
images/icon_warning.gif
Attention symbol. Image used if UI_ATTENTION_SYMBOL is specified.
images/icon_information.gif
Information symbol. Image used if UI_INFORMATION_SYMBOL is specified.

Example

dim title_var as c = "Information"
dim message_text_var as c = "An <em>HTML</em> message box has been displayed!"
a_result = ui_html_msg_box(title_var, message_text_var, UI_OK + UI_FIRST_BUTTON_DEFAULT + UI_INFORMATION_SYMBOL, 2, 1, .t., .f., "inches", "inches", "Win3D")

Limitations

Desktop applications only

See Also