Add an event command to change the state of a graphic element
Add an event command to change the state of a graphic element. For example, have a graphic element fill with color or change colors when the event is triggered by a state change on the HMI device.
Prerequisites
- Create an event to trigger the command:
- Touch press.Occurs when touching the item on the screen that is configured with the event.
- Touch release.Occurs when releasing the item on the screen that is configured with the event.
- Key press.Occurs when
- Key release.Occurs when releasing the specified key.
- Expand the
- Select the graphic element configured with the touch or key event.
- In thePropertiespane on theEventstab, selectAdd Command.
Statecategory and select the command:- State Previous.Applies the previous state in the selected State Table to the graphic element when the event occurs. Select the name of the desired State Table.
- State Next.Applies the next state in the selected State Table to the graphic element when the event occurs. Select the name of the desired State Table.TIP:Tips:
- SelectWrap Aroundto continue to apply states when the event occurs, even when reaching the beginning or end of the State Table.
- Creating aStateevent with aState Previouscommand withWrap Aroundselected loops the graphic element through states in the State Table as the event occurs.
Provide Feedback