Group
A group combines several elements into one: they move and stretch together, and the visibility and operator control enable animations act on the whole group. Coordinates of nested elements are counted from the group’s corner. A group is created in the editor from the selected elements with the Group command (Ctrl+G).
If the same drawing repeats many times with different tags, make it a genie: editing the genie changes all instances at once.
Properties
Section titled “Properties”Only the properties of every element: name, position, size, tooltip, rotation, transparency, operate right.
From scripts
Section titled “From scripts”Item.Type = Group. Any property is read and changed by name: Item.Width = 200. The common element members (Visible, Enabled, Value, Raise, Apply…) are described in Elements from scripts.
Events
Section titled “Events”Mouse, hover, focus and keyboard — as for any element (see Events and functions).
Examples
Section titled “Examples”Hide the whole unit — together with all nested elements.
Screen.Items("MeteringUnit").Visible = Tags("Meter.Installed").Value;A nested element of the group — by name with Children.
var g = Screen.Items("Pump1");g.Children("Label").Text = "Pump 1 — standby";HMI.ShowMessage("Elements in the group: " + g.Children().length);Stretch the group — nested elements scale with it.
var g = Screen.Items("Diagram");g.Resize(g.Width * 1.5, g.Height * 1.5);