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

C H A P T E R 1 5

Controls

Action Menu Contents and Labeling

An Action menu should display only the Action icon and the standard downward-pointing arrow used in icon and bevel buttons with attached pop-up menus (for more information about these controls, see “Icon Buttons and Bevel Buttons with Pop-Up Menus” (page 279)). It’s essential that you use the system-supplied Action icon so users understand what the control does (for more information on the Action icon and icons available for other types of controls, see “System-Provided Images” (page 151)).

The contents of an Action menu should conform to the guidelines for contextual menus, such as ensuring that each Action menu item is also available as a menu command and avoiding the display of keyboard shortcuts. Formoreinformationontheguidelinesthatgoverncontextualmenus,see “ContextualMenus” (page 184).

An Action menu does not need a label, because users are familiar with the meaning of the Action icon. The only exception is the label you should supply for an Action menu button in a toolbar, because users can customize the toolbar to view toolbar items as icons with text or as text instead of icons (see “Toolbars” (page 196) for more information on toolbars).

Action Menu Specifications

Controlsizes: The Action menu icon is available in regular and small sizes. Use the icon size that’s proportional to the size of the control you want to use.

Controlspacing: Spacing depends on what type of control you use. For details, see “Rectangular-Style Toolbar Controls” (page 250) (if you plan to put an Action menu in a toolbar) or “Gradient Buttons” (page 265) (if you plan to put an Action menu below a source list or other type of list view).

Action Menu Implementation

You can create an Action menu in Interface Builder. If you need an Action menu control for a toolbar, select a rectangular-style toolbar control (see “Rectangular-Style Toolbar Controls” (page 250) for more information about this control). In the Attributes pane of the inspector, specify NSActionTemplate for the image.

If you need an Action menu control at the bottom of a source list or list view, you can use a gradient button (see “Gradient Buttons” (page 265) for information on this control).

Combination Boxes

A combination box (or combo box) is a text entry field combined with a drop-down list. Combo boxes can display a list of likely choices while still allowing the user to type in an item not in the list. For example, Safari allows users to set a preference for the minimum font size to display. In its Advanced preferences pane (shown in Figure 15-35), Safari lists several font sizes in a combo box, and users can supply a custom font size if none of the listed choices is suitable.

286

Selection Controls

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

C H A P T E R 1 5

Controls

Figure 15-35 A combo box allows users to select from a list or supply their own item

A combo box

Users can type any appropriate characters into the text field. If a user types in an item already in the list, or types in a few characters that match the first characters of an item in the list, the item is highlighted when the user opens the list. A user-typed item is not added to the permanent list.

Users open the list by pressing or clicking the arrow to the right of the text field. The list descends from the text field; it is the same width as the text field plus the arrow box, and it has a drop shadow.

When the user selects an item in the list, the item replaces whatever is in the text entry field and the list closes. If the list was opened by pressing the arrow, the user selects an item in the list by dragging to it. If the list was opened by clicking the arrow, the user selects an item by clicking it or by pressing the Up Arrow or Down Arrow key. The user can accept an item by pressing the Space bar, Enter, or Return.

If the list is open and the user clicks outside it, including within the text entry field, the list closes.

Figure 15-36 A combo box with the list open

Combo Box Usage

Use a combo box when you want to give users the convenience of selecting an item from a list combined with the freedom of specifying their own custom item. A combo box does not allow multiple selections, so be sure to offer users a list of items from which they can choose only one at a time.

Selection Controls

287

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

C H A P T E R 1 5

Controls

Combo Box Contents and Labeling

The default state of the combo box is closed, with the text field empty or displaying a default selection. Recall that user-supplied items are not added to the control’s permanent list.

The default selection (which may not be the first item in the list) should provide a meaningful clue to the hidden choices, but it’s a good idea to introduce a combo box with a label that helps users know what types of items to expect.

Don’t extend the right edge of the list beyond the right edge of the arrow box; if an item is too long, it is truncated.

Combo Box Specifications

Control sizes: The height of a combo box is fixed for each size, but its width should be wide enough to accommodate the longest list item.

Label spacing and fonts: The text of the list items in a combo box should be in a font that is proportional to the size of the control. The text of the introductory label should be an emphasized version of the same font. Use the following metrics and specifications for a combo box:

Regular size:

List-item text: System font. This font is automatically supplied by Interface Builder.

Introductory label: Emphasized system font. Leave 8 pixels between the end of the text (colon) and the left edge of the control.

Small:

List-item text: Small system font. This font is automatically supplied by Interface Builder.

Introductory label: Emphasized small system font. Leave 6 pixels between the end of the text (colon) and the left edge of the control.

Mini:

List-item text: Mini system font. This font is automatically supplied by Interface Builder.

Introductory label: Emphasized mini system font. Leave 5 pixels between the end of the text (colon) and the left edge of menu.

Figure 15-37 shows how the combo box introductory label and list-item text are positioned.

Figure 15-37 A combo box with an introductory label and list-item text

Control spacing: When combo boxes are stacked vertically, leave the following amounts of space between them:

Regular size: At least 12 pixels.

288

Selection Controls

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

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