O'Reilly logo

REALBasic: TDG, 2nd Edition by Matt Neuburg

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 12.  Buttons and Static Texts

For purposes of this chapter, the notion of a button is fairly loose—loose enough to embrace seven built-in control classes. (A button here is like smut; I may not be able to tell you what it is, but I know it when I see it. If pressed for a definition, I might say: a button is something you click with the mouse to toggle its state or to initiate some process.) The seven classes I’m calling buttons are PushButton, BevelButton, Placard, LittleArrows, CheckBox, RadioButton, and DisclosureTriangle. An eighth class, GroupBox, is used to tell REALbasic which RadioButtons are to be grouped together, so it is treated along with them. Finally, this chapter also deals with StaticText, because it is similar to the caption of a CheckBox or RadioButton.

Figure 12-1 shows a window illustrating several of the classes discussed in this chapter. It has two GroupBoxes, each containing two RadioButtons; a CheckBox; a StaticText—next to an EditField, treated in Chapter 13—and two PushButtons.

Various buttons
Figure 12-1. Various buttons

These are all RectControls, and therefore they receive all the events and have all the methods and properties listed in Chapter 10: Open and Close events; Visible, Enabled, and AutoDeactivate properties; Top, Left, Height, and Width properties; LockLeft, LockRight, LockTop, and LockBottom properties; MouseEnter, MouseMove, and MouseExit events; ...

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