Skip to main content
Version: 7.9

system.gui.warningBox

This function is used in Python Scripting.

Description

Displays a message to the user in a warning style pop-up dialog.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.gui.warningBox(message [, title])

Parameters

TypeParameterDescription
StringmessageThe message to display in the warning box. Will accept html formatting.
StringtitleThe title for the warning box. [optional]

Returns

Nothing

Scope

Client

Code Examples

Example #1
# This code show a yellow popup box similar to the system.gui.messageBox function.
# Start the motor, or, warn the user if in wrong mode
runMode = event.source.parent.getPropertyValue('RunMode')

# Cannot start the motor in mode #1
if runMode == 1:
system.gui.warningBox("Cannot start the motor, current mode is <B>VIEW MODE</B>")
else:
system.db.runUpdateQuery("UPDATE MotorControl SET MotorRun=1")