Description
In BBj 25.03 and higher, this method sets assorted options on this BBjMsgBox, corresponding to the MODE= option of the MSGBOX() Function.
Syntax
Return Value |
Method |
BBjMsgBox |
modes(String modes) |
Parameters
Variable |
Description |
modes |
One or more comma-separated options that modify the behavior of this BBjMsgBox.
X=int,Y=int |
The optional X and Y values display the dialog at a specific screen location. Either or both may be specified. By default, the MSGBOX dialog is centered. |
W=int,H=int |
The optional W and H values specify the maximum width and height of the dialog window. Either or both may be specified. The MSGBOX dialog size is also limited by the size of the screen or browser. |
SPLIT=int |
The optional SPLIT value specifies the maximum number of characters to show on a line before inserting a line break. This value overrides the STBL("!MSGBOX_SPLIT") setting. The default is 100 characters. |
STYLE=name |
Sets a MSGBOX style name, equivalent to BBjControl::addStyle. This can be used to apply custom CSS styling to a BUI MSGBOX. |
attr=value |
The mode string can specify selected DWC component attributes (e.g. theme=primary,blurred=true). DWC button attributes can be applied to selected buttons using the format button-0-theme=success, button-1-theme=danger.
|
ICON=imagefile ICON=url |
The optional ICON value specifies a custom icon image, either an image file or a URL that will be reachable from the client (e.g. a DATA URL). |
ICONWIDTH=int |
The optional ICONWIDTH value specifies an integer width to scale the specified ICON.
|
ICONHEIGHT=int |
The optional ICONHEIGHT value specifies an integer height to scale the specified ICON. |
SCALE=num |
The optional SCALE value specifies the scaling factor to be applied to the dialog button and text fonts. |
|
Return Value
Returns this BBjMsgBox object, enabling methods to be chained.
Example
msgbox! = bbjapi().msgbox("BBjMsgBox with custom icon")
msgbox!.modes("icon=https://basis.cloud/wp-content/uploads/2023/10/BBjlogo.jpg")
print msgbox!.show()
|
See Also
BBjAPI
MSGBOX() Function
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.