<< Click to Display Table of Contents >> Navigation: Object Reference > Palette Objects > Lamp |
The lamp object is based on the button object. It can display two states: On or off / lit or not lit.
The lamp can be turned on or off by a variable reference. 0 or false equals off, 1 or true equals on.
In difference to the button object, the images for the lamp are not included as separate Picture Graphic objects.
Instead, there are two new parameters, Pressed Image and Released Image.
For common object properties of the object refer to this page. Here only the lamp specific properties are described.
Please note that the "Set as Input" property for the lamp object is disabled by default, as it is rather an indicator than a button. But it can still be enabled to be used like a button.
Draw ShadowA button shadow can be drawn around the button that changes according to pressed or released state of the button. This is a visual help for the user to determine if the button is just pressed or not. Disable this property if the design of the button is completely custom and the press/release state is distinguishable using the pressed and released objects (see above). If this property is enabled, a small region between button background (or object inside button) and border of the button is reserved for the shadow. If it is disabled, the background of the button (or object inside the button) goes directly to the border. Note: Even though the lamp is a round object visually, the button is still rectangle, and so is the shadow, if this property is enabled. Default value: Disabled Possible value: Enabled or Disabled Shadow ColorIf "Draw Shadow" is enabled one can define the shadow color used to draw the shadow. The background color of the shadow is the button background color which includes that. the background of the shadow is transparent if the button is configured as transparent. The button shadow consists of two areas where one is drawn in the opaque color selected and the other is drawn in a half-transparent version of the same color. Both colors are switched when button is pressed to simulate a kind of 3D effect of the pressed/released button. Default value: Black. Possible value: Any color allowed by standard color chooser. LatchingLatching means: When a button is pressed and released, it toggles state and stays in the toggled state until it is pressed again. Like that a latching button resembles a light switch whereas a non-latching button resembles a door-bell switch. With this property this behavior can be enabled. Default value: Disabled Possible values: Enabled or Disabled Pressed StateSwitch between the release or pressed state of the button. This is important for having a preview of the object and also for adding pressed/released objects for the button (see above). Note: If only one child is assigned to the button the other state will be shown as empty on PC tool but on the device this one child will show permanently - button shadow should be used to show button state in this scenario. This property has no influence to runtime behavior. Default value: Disabled Possible values: •Enabled (button is in pressed state) •Disabled (button is in released state) Pressed Object IDNot used for this object type. Released Object IDNot used for this object type. Toggle Background ImageWith this property the usage of the Pressed Image and Released Image can be turned on or off. Pressed ImageThe image set in this property will be used as the pressed image. By default, this will be set to the standard lamp pressed image. Released ImageThe image set in this property will be used as the released image. By default, this will be set to the standard lamp released image. |
The following events can be configured for the button object: •OnPress •OnRelease •OnLongPress •OnLongRelease •OnDblClick •OnOpenForInput •OnEnabledWithFocus •OnEnabledWithoutFocus •OnValueChange •OnCancel See here for the descriptions of all event and possible actions that can be assigned. |