Creating Graphical User Interfaces |
Callback Properties
Components use callbacks to do their work. A callback is a function that executes when a user performs a specific action such as clicking a push button, selecting a menu item, or pressing a keyboard key, or when a component is created or deleted. Each component and menu item has properties that specify its callbacks. When you create a GUI, you must program the callbacks you need to control operation of the GUI.
A component can have many callback properties, but the most common one is the Callback
property. The code you provide for the Callback
property performs the primary work of the component. It executes, for example, when a user presses a push button, moves a slider, or selects a menu item. Programming the GUI shows you how to program the Callback
property for the push buttons and pop-up menu in this example.
String Property for Pop-up Menus | The Tag Property |
© 1994-2005 The MathWorks, Inc.