Copyright ã1996 by NeXT Software, Inc.  All Rights Reserved.

;CreatingMatricesOfObjects.rtfd;;¬  Next Section	;ArrangingObjects.rtfd;;¬  Previous Section

Groupingobjects;¬Grouping objects

1	Select the objects you want grouped.

2	Choose Format ¬ Group ¬ Group in Box.

When you group objects, Interface Builder draws a box around them. You select, move, copy, cut, and paste the objects within the box as a group. Interface Builder gives you two ways to group objects.

In the first method, you select the objects of the group and choose a menu command. The box has a title, initially ªTitle.º To change this, double-click the title to select it (as in the example above, on the right). Then type the new name for the grouped objects.

¬

To ungroup the objects, making each object individually selectable again, select the group and choose Format ¬ Group ¬ Ungroup. 

In the second method, you use the box object in the Views palette. First, drag a box onto a window or panel. Then add its contents:

¬

The Group submenu has two other interesting commands. With Group in Scroll View, you can bind an NSText object (or your own custom view object) to horizontal and vertical scrollbars. With Group in Split View, you can group two related views (often a custom view and a browser object) in a split view, which has a sizing bar between the views.

See Chapter€3 ªSetting an Object's Attributesº for other things you can do with box objects.  ;../03_SettingObjectAttributes/SettingBoxAttributes.rtfd;;¬

See the specifications of the NSScrollView  ;/NextLibrary/Frameworks/AppKit.framework/Resources/English.lproj/Documentation/Reference/Classes/NSScrollView.rtfd;;¬  and NSSplitView  ;/NextLibrary/Frameworks/AppKit.framework/Resources/English.lproj/Documentation/Reference/Classes/NSSplitView.rtfd;;¬  classes in the Application Kit Reference.