Responding to Events in a Graphical User Interface
- Updated2023-02-21
- 1 minute(s) read
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:
- 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.
- 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.
- 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. |