Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Apple Human Interface Guidelines.pdf
Скачиваний:
13
Добавлен:
27.03.2015
Размер:
29.57 Mб
Скачать

C H A P T E R 1 5

Controls

Small: Small system font.

Mini: Mini system font.

If you display an introductory label on the same line as the first checkbox, use the following metrics to position it correctly:

Regular size: 8 pixels from the end of the label (the colon) to the control.

Small: 6 pixels from the end of the label (the colon) to the control.

Mini: 5 pixels from the end of the label (the colon) to the control.

Be sure to align the baseline of the introductory label with the baseline of the closest checkbox’s label, as shown in Figure 15-25.

Figure 15-25 Checkbox label alignment

Align the baselines of the label and the first checkbox's text

If you display an introductory label above a group of checkboxes, leave 8 pixels between the label and the first checkbox.

Control spacing: Typically, checkboxes are arranged vertically, because this arrangement makes it easier for users to distinguish one state from another. As described in “Checkbox Usage” (page 275), you should align a set of independent checkboxes so that all appear to be at the same level. If one checkbox describes a state or action that depends on the state of another checkbox, you can indent the dependent checkbox below the controlling one.

Use the following metrics when you lay out checkboxes in your window:

Regular size: 8 pixels between controls when stacked.

Small: 8 pixels between controls when stacked.

Mini: 7 pixels between controls when stacked.

Checkbox Implementation

Checkboxes are available in Interface Builder. To create one using Application Kit programming interfaces, create an NSButton object of type NSSwitchButton.

Segmented Controls

A segmented control is divided into two or more segments and behaves as a collection of radio buttons or checkboxes. Like a push button, a segmented control initiates an immediate action—that is, when the user clicks one of the segments, something should happen.

Selection Controls

277

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

C H A P T E R 1 5

Controls

Mac OS X offers different styles of segmented controls for use in different window areas. The segmented control described in this section is suitable for use in the window body; it should not be used in the window-frame areas. For information on styles of segmented controls that are available for use in the window-frame areas (the toolbar and the bottom bar), see “Window-Frame Controls” (page 249). Figure 15-26 shows an example of segmented controls in a window-body area.

Figure 15-26 Segmented controls can be used as radio buttons

Segmented controls

Segmented Control Usage

Use a segmented control when you want to offer the user a few closely related choices that affect a selected object. You can also use a segmented control to change views or panes in a window. Note that although a segmented control used as a view-changer looks similar to a tab view control, it does not behave the same: A segmented control is not attached to the panes, whereas a tab view control is attached to them. See “Tab Views” (page 329) for more information about tab views.

If you need to provide a way for users to add and delete objects in a source list or other split view, don’t use a segmented control that contains the plus and minus symbols. Instead, if you need to put an add-delete control in a bottom bar, use a rectangular-style toolbar control (described in “Controls for Toolbars and Bottom Bars” (page 250)). If you need to put an add-delete control in the window body, use a gradient button (described in “Gradient Buttons” (page 265)). Also, you don’t need to create the plus and minus icons for these controls, because Mac OS X v10.5 and later provides these and many other icons for your use (see “System-Provided Images” (page 151) for more information).

Segmented Control Contents and Labeling

A segmented control can contain either icons or text, but not a mixture of both. However, when the control contains icons, you can place a text label below the control.

For the text in each segment, or the label below it, use a noun (or short noun phrase) that describes a view or an object, and use title-style capitalization (see “Capitalization of Interface Element Labels and Text” (page 131) for more on this style).

278

Selection Controls

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]