LabWindows/CVI

Content Type
Programming Language
Current manual
Product DocumentationLabWindows/CVIResponding to Events in a Graphical User InterfaceCurrent page
Table of Contents

Responding to Events in a Graphical User Interface

Responding to Events in a Graphical User Interface

When designing a user interface, you set up controls to generate events. For example, selecting a command button generates a user interface event that LabWindows/CVI passes to your C program. In fact, a single action on a LabWindows/CVI control can generate multiple user interface events. For example, selecting a command button can pass the following user interface events to your program for processing:

  1. EVENT_GOT_FOCUS—If the command button is not the active control (i.e., it does not have the input focus), selecting the button makes it the active control. When a control receives the input focus, an EVENT_GOT_FOCUS occurs.
  2. EVENT_LEFT_CLICK—When users click with the left mouse button on the command button, an EVENT_LEFT_CLICK occurs. LabWindows/CVI user interface controls can recognize left, right, single, and double mouse clicks.
  3. EVENT_COMMIT—When the user releases the mouse button, an EVENT_COMMIT occurs signifying that the user has performed a commit event on the control.
Note  Each control can have one or more control modes that determine how the control responds to the events.
Was this information helpful?