O'Reilly logo

Mac Programming for Absolute Beginners by Wallace Wang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15. Choosing Commands with Buttons

The user interface lets you communicate with a program. In the old days, you had to type a command to make a program do something. If you didn't know the command to type or if you misspelled it, your command wouldn't work, and the program wouldn't respond to your actions.

Fortunately, today's programs use a graphical user interface (GUI) that displays options on the screen for the user to select using the mouse or keyboard. For most programs, the simplest way to offer options for the user to select involves using buttons.

A button typically appears on the screen as a rectangular object with a descriptive command displayed inside such as the word Print or Cancel. However, buttons can appear in different ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required