Control Modes for Generating Events
You can set the mode—Normal, Indicator, Hot, or Validate—for many controls, to match the type of event a control generates.
- Value changed events are generated when the user of the GUI modifies the setting on a
control, such as dragging the slider on a slide control with the mouse, or entering a character in a string control.
- Commit events are generated when the user of the GUI actually commits to an
operation such as making a menu selection, typing in a number and pressing <Enter>, or releasing the mouse
button after dragging the slider on a slide control.
When you create a control you can assign one of the following control modes, which determine how the control generates
events and to what extent the user can operate it.
- Normal mode specifies that the user can operate the control and that the control
generates all events except commit events.
- Indicator mode specifies that users cannot operate the control and that the control cannot
generate commit or value changed events. Strip chart and text message controls are examples of controls that are always indicators.
- Hot mode is identical to Normal mode except that the control
generates a commit event when a user acts upon it. Normally, a hot control generates a
commit event when its state is changed. For example, if the user drags a binary switch from off to on and releases the mouse button, a commit event is generated.
- Validate mode is identical to Hot mode except that, before the commit event is generated, the
program validates all numeric controls on the panel for which you have set the range-checking attribute to Notify. The Notify setting causes LabWindows/CVI to check the
control value against a predefined range. If it finds an invalid condition,
LabWindows/CVI activates the control, and displays a notification box like the one
shown below. The validate control cannot generate a commit event until the user
enters a new, valid value into all controls that are out of range. This process
ensures that all numeric/scalar controls are valid before the GUI reports a
commit event.
Numeric Control with Out Of Range Message Pop-Up