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 by performing an action, like 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 selecting from a menu, typing in a number and then pressing <Enter>, or releasing the mouse button after dragging the slider on a slide control.
When creating a control, assign one of the following control modes to 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 types of 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. For example, if the user drags a binary switch from off to on and then releases the mouse button, a commit event is generated.
- Validate mode is identical to Hot mode except that before a 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 following one.
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