# Precedence of Callback Functions

Events trigger callback functions in the following order:

- For control operation events:
  1. Control callback
  2. Main callback
  3. Panel callback (keypress and mouse events only)
  4. Main callback
- For panel events:
  1. Panel callback
  2. Main callback
- For menu commit events:
  1. Menu item callback
  2. Main callback
- Timer control event: Control callback
- Main callback event: Main callback

| Note The commit event is placed in the GetUserEvent queue after being sent to all callbacks.