Promotic
WikipediaLinkedInYoutubeTwitterFacebook

onModeChange - event of object PmgObject

Description:
The event is triggered when the Pmg object mode changes. This may be such change that should cause some Pmg object visual reaction. The following attributes of Pmg object are now being observed:
- visibility
- forbidden control
- focus
- hovering mouse cursor over the Pmg object
.
Parameters:
pMe(Object) Reference to the PmgObject object where the event rises.
pEvent(Object) Reference to object describing detailed information about the specific event.
pEvent.NewValue - (Long)New value with Pmg object state. The states of observed attributes are stored as individual bits. The value with set bit is stored in hexadecimal syntax (JavaScript).
0x0001 (bit 0) - The bit indicates that the Pmg object is not visible (is hidden). See Visible property.
0x0002 (bit 1) - The bit indicates that some parent of the Pmg object is not visible (is hidden).
0x0010 (bit 4) - The bit indicates that the Pmg object is disabled. See Enabled property.
0x0020 (bit 5) - The bit indicates that some parent of the Pmg object is disabled.
0x0100 (bit 8) - The bit indicates that the Pmg object has focus (for keyboard control). See Focus property.
0x1000 (bit 12) - The bit indicates that the mouse cursor is hovering over the Pmg object. See MouseOn property.
0x2000 (bit 13) - The bit indicates that the mouse cursor is hovering over some embedded Pmg object.
Note:

in the PmgRoot object, this event is triggered only for the value pEvent.NewValue = 0x0010 (i.e. if this object is disabled or enabled).

 
This event is also functional in Web panels.
 
This event can be used for creating active Pmg objects that react to mouse movement, or keyboard input by changing their graphic properties. This can be used, for example, in the PmgCanvas object, where this can be used to design single state or multi state buttons. In this event, for example, the color can be changed based on the mouse cursor hovering over the item, the object is enabled/disabled, the object has focus, etc.
See also:
Example:
Change background color of the PmgPane object based on the fact that the object or its parents are enabled/disabled (0x30 = item 0x0010 + parent 0x0020).
JavaScriptVBScriptSelect and copy to clipboard

pMe.ColorItem = (pEvent.NewValue & 0x30) ? "#808080" : "#C0C0C0";

History:
Pm8.03.00: New event in each Pmg object informs that:
- there is a mouse cursor hovering over the item
- the object got focus
- the Visible or Enabled properties were changed.
PROMOTIC 9.0.7 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice