Update cookies preferences
Promotic

Preconfiguration "Button two-state with icon"

Creates object configured as two-state button.

This preconfiguration can be activated when creating a new Pmg object.
 
This preconfiguration is included in the "/ Button / Button two-state" group.

The created PmgCanvas object contains variables title0, title1, mode, push and state. Variable title0 and title0 are used for text displayed in the button in the state 0 or 1. Variable mode and push define its appearance. the state variable defines the current state 0 or 1.

The events onKeyPress and onMousePress are solving the conditions that are defined for calling the designer "onPressUp" method.

Designer method onPressUp on the "Methods" tab of the Pmg object is used to define the action that will be connected with switching the button between states 0 or 1.

There are variables that affect the button and text color, text size and margins in the script on the "Draw" tab.
These configurators can be set before the preconfiguration is created:
The name of created objectName (identifier) of the Pmg object. It is used for obtaining the Pmg object by the PmgObject.Items method.
This configurator sets the initial value of the Name property.
The maximum name length is 30 characters.
This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and first character must not be a number.
Image (text) location in buttonImage and text location in button.
Whole area (no text)
Top (text centered down)
Left (text behind image on left)
Left (text centered to the right)
Left (text to right edge)
Right (text to left edge)
Right (text centered left)
Right (text to image right)
Text colorText color
Background colorImage background color
Button text in the state 0Text written into the variable.
Image colorSetting of the color of the image. For some images this configurator sets the value of the imgColor variable of the PmgCanvas object.
For some types of images this configurator is not displayed.
Image rotationRotation of the image in degrees (45, 90, 180, ...). For some images this configurator sets the value of the rotateAngle variable of the PmgCanvas object.
For some types of images this configurator is not displayed.
Flip imageSpecifies whether the image should be flipped along the vertical axis.
For some types of images this configurator is not displayed.
No
Yes
StateThe state of a device or component, e.g. the condition of a switch. For some panels this configurator sets the value of the state variable of the PmgCanvas object.
For some types of images this configurator is not displayed.
Rotation of the moving partThe angle of rotation of a moving part, e.g. propeller or flap (0 - 360°). For some images this configurator sets the value of the rotate variable of the PmgCanvas object.
For some types of images this configurator is not displayed.
Icon selectionOpens a window for selection of the image
PreviewImage preview
Button text in the state 1Text written into the variable.
Image colorSetting of the color of the image. For some images this configurator sets the value of the imgColor variable of the PmgCanvas object.
For some types of images this configurator is not displayed.
Image rotationRotation of the image in degrees (45, 90, 180, ...). For some images this configurator sets the value of the rotateAngle variable of the PmgCanvas object.
For some types of images this configurator is not displayed.
Flip imageSpecifies whether the image should be flipped along the vertical axis.
For some types of images this configurator is not displayed.
No
Yes
StateThe state of a device or component, e.g. the condition of a switch. For some panels this configurator sets the value of the state variable of the PmgCanvas object.
For some types of images this configurator is not displayed.
Rotation of the moving partThe angle of rotation of a moving part, e.g. propeller or flap (0 - 360°). For some images this configurator sets the value of the rotate variable of the PmgCanvas object.
For some types of images this configurator is not displayed.
Icon selectionOpens a window for selection of the image
PreviewImage preview
Status change confirmation dialogConfirmation dialog before executing the action.
Question before confirming the action

History:
Pm8.03.00: Created
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.