Chapter 16. Shapes and Decorations
This chapter is about some built-in controls that spice up the appearance of a window, but with which the user is not expected to interact consciously. Several of these display themselves as simple geometric shapes: Rectangle, Oval, RoundRectangle, and Line. These are what I call the shapes. The others are standard controls introduced with the Macintosh Appearance Manager: Separator, ImageWell, ChasingArrows, and PopupArrow. I call these the decorations. Some examples appear in Figure 16-1.
Figure 16-1. Some shapes and decorations
Except for Line, these are all RectControls and therefore 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; and Refresh and RefreshRect methods. On drag-and-drop, see Chapter 24.
Since RectControls can detect mouse movements, the shapes and decorations can be animated in interesting ways (an example appeared in Chapter 10). Most of these controls (ImageWell is the exception) do not receive mouseclick events; rather, mouseclicks pass through them to whatever is behind.
Changing the value of a shape’s Enabled property does not change its appearance; in fact, shapes are ...
Get REALBasic: TDG, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.