11.34 querybox()
With the built-in function querybox() messageboxes and dialogboxes (windows with the .dialogbox attribute set to true) can be opened. The processing of rules in the ISA Dialog Manager is interrupted until the messagebox or dialogbox has been closed.
Definition
anyvalue querybox ( object Messagebox input { , object Parent input } { , boolean ShipEvent := true input } )
Parameters
- object Messagebox input
- In this parameter the messagebox or dialogbox to be opened is passed to the function.
- object Parent input
-
This optional parameter indicates the parent object above which the messagebox is to be opened. This parameter may be a window as well as a null-ID. The messagebox will be displayed centered on the parent window, if the window system allows it. Otherwise the position will be determined by the window system itself (e.g. screen center).
The parameter is ignored for dialogboxes.
- boolean ShipEvent := true input
- This parameter controls, whether a changed event for .visible is triggered for the dialogbox. When the parameter is set to true (default), an event is triggered. With false, the event is canceled.
Return value
Messageboxe
- button_abort
-
The messagebox was closed using the
Abort
button. - button_cancel
-
The messagebox was closed using the
Cancel
button. - button_ignore
-
The messagebox was closed using the
Ignore
button. - button_no
-
The messagebox was closed using the
No
button. - button_ok
-
The messagebox was closed using the
OK
button. - button_retry
-
The messagebox was closed using the
Retry
button. - button_yes
-
The messagebox was closed using the
Yes
button. - nobutton
-
The messagebox has not been opened due to an error.
For dialogboxes, the return value is set through the closequery() function.
Example
Opens a messagebox and queries which one of the provided pushbuttons the user has selected.
!! Program waits until the user has chosen a pushbutton if button_ok = querybox(MyMessagewindow) then !! User wants the action to be executed