In BBj 25.03 and higher, this method sets assorted options on this BBjMsgBox, corresponding to the int expr parameter of the MSGBOX() Function.
Syntax
Return Value |
Method |
BBjMsgBox |
option(int options) |
Parameters
Variable |
Description |
options |
Numeric expression that identifies the dialog's buttons, icons, default button, and modal setting. The values are additive. For example, the following expression indicates that the dialog has OK and Cancelbuttons and an exclamation mark icon. The Cancel button is the default:
(1 +48 +256 ) 305
Buttons
Value |
BBjMsgBox Constant |
Buttons |
0
|
MSGBOX_BUTTONS_OK |
OK
|
1
|
MSGBOX_BUTTONS_OK_CANCEL |
OK and Cancel |
2
|
MSGBOX_BUTTONS_ABORT_RETRY_IGNORE |
Abort, Retry, and Ignore |
3
|
MSGBOX_BUTTONS_YES_NO_CANCEL |
Yes, No, and Cancel |
4
|
MSGBOX_BUTTONS_YES_NO |
Yes and No |
5
|
MSGBOX_BUTTONS_RETRY_CANCEL |
Retry and Cancel |
7
|
MSGBOX_BUTTONS_CUSTOM |
Custom
|
Icon
Value |
BBjMsgBox Constant |
Icon |
0
|
MSGBOX_ICON_NONE |
None |
16
|
MSGBOX_ICON_STOP |
Stop Sign |
32
|
MSGBOX_ICON_QUESTION |
Question Mark |
48
|
MSGBOX_ICON_EXCLAMATION |
Exclamation Point |
64
|
MSGBOX_ICON_INFORMATION |
Information Symbol |
Default Button
Value |
BBjMsgBox Constant |
Default Button |
0
|
MSGBOX_DEFAULT_FIRST |
First Button
|
256
|
MSGBOX_DEFAULT_SECOND |
Second Button
|
512
|
MSGBOX_DEFAULT_THIRD |
Third Button
|
65536
|
MSGBOX_DEFAULT_NONE |
Do not allow the currently highlighted button to be selected with Enter. |
Render HTML
Value |
BBjMsgBox Constant |
Action |
0
|
|
Render title and/or message as HTML if the string starts with <html> . |
32768
|
MSGBOX_RAW_TEXT |
Disable HTML processing. Render both title and message as raw text, even if the string starts with <html> . |
MDI
Value |
BBjMsgBox Constant |
Action |
131072
|
MSGBOX_MDI_DESKTOP |
If the current window is contained within an MDI desktop, limit the MSGBOX dialog to the MDI desktop. Ignored if not in MDI.
|
|
Return Value
Returns this BBjMsgBox object, enabling methods to be chained.
Example
msgbox! = bbjapi().msgbox("OK/Cancel BBjMsgBox")
msgbox!.options(BBjMsgBox.MSGBOX_BUTTONS_OK_CANCEL+BBjMsgBox.MSGBOX_ICON_QUESTION)
print msgbox!.show()
|
See Also
BBjAPI
MSGBOX() Function
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.