Learn how to organize the shapes in a Visio diagram using Containers, Lists, and Callouts by working with built-in Structured Diagrams shapes or by creating new Structured 




Diatrams content.
Introduction
The need for organization in diagrams
Customers are creating and maintaining more complex diagrams than in the past. The number of pages in a document, the number of shapes on a page, and the amount of information in shapes are increasing for a wide range of diagram types. In addition to the increase in information density, customers are capturing more of the logical definition of their processes, projects, and 
systems. They are moving beyond diagrams as pictures and moving toward diagrams as semantic representations of their business.
As complexity grows, the need for organization of the diagram information grows as well. Visio users employ a number of strategies to keep their diagrams organized and understandable. Common solutions include arranging and aligning shapes, applying similar formatting to related shapes, and drawing boxes around shapes to define logical groups. While these solutions do improve readability, they can require a lot of work to set up and maintain.
Take the example of drawing a box around related shapes. In previous Visio releases, users would draw a rectangle around some shapes, choose Send to Back to move it behind the shapes, add a text label and position it near the rectangle edge, and finally group everything to keep the shapes together. Many steps are required to set up the relationship. Additionally, it becomes difficult to access the individual shapes, and the user must ungroup and regroup every time the contents change.
The opportunity for Structured Diagrams
Visio 2010 offers a new way to organize the contents of diagrams. This solution recognizes that users would have to do a lot less work organizing their information if the Visio application understood more of the logical relationships being expressed in the diagram. If Visio had a natural understanding of visual containment, then the user would not need to go through so many steps to set up a boundary around shapes. Visio could also take responsibility for maintaining the relationship as the diagram changed.
This concept of understanding the logical relationships in a diagram is called Structured Diagrams. A Structured Diagrams document treats shapes as more than a collection of objects on a page. With Structured Diagrams, shapes can have logical relationships with each other. Visio 2010 uses its awareness of these relationships to introduce a set of interaction behaviors. These behaviors facilitate the construction and maintenance of shape relationships.
The Structured Diagrams feature set
There are three types of Structured Diagrams relationships available in Visio 2010, and there is a Visio 2010 feature for each relationship type.
Containment - Shapes can be visually bounded by another shape. The Containers feature allows users to set up and maintain containment relationships.
Order - Shapes can be arranged next to each other in a specified sequence. The Lists feature allows users to manage order relationships.
Association - Shapes can describe or annotate other shapes. The Callouts feature allows users to set up and maintain association relationships.

Containers, Lists, and Callouts make up the core feature set for Structured Diagrams. These features are discussed in a separate 




article.These features enable specific shapes to form logical relationships with other shapes in the diagram. These features are discussed in the next section. There are also a series of platform features in Visio 2010 that enhance the behaviors of Containers, Lists, and Callouts to make them even easier for users and shape designers to work with.
Working with Containers
The Containers feature in Visio 2010 makes it easy to add a visual boundary or container around shapes, including displaying a label. Visio does all the work to maintain the relationship between the container and its contents. To add a container to the diagram, first select the shapes to be contained. Then choose the Container command from the Insert tab of the ribbon. A gallery appears with several different container styles. Click on a style to add the container to the diagram.

Container behaviors
The shapes inside the container are not grouped into a single shape, so users have direct access to continue working with them. Shapes are added or removed simply by dragging them in or out of the container. When dragging a shape, an orange highlight appears around the container to indicate that Visio will make the shape a member of the container. The orange highlight also appears when selecting an existing member of a container. The container can automatically grow or shrink as needed to fit the contents. Moving, copying, or deleting the container will move, copy, or delete the contents as well.

Customization
Containers can be formatted just like regular shapes. In particular the alignment of the heading is changed using the text alignment buttons on the Home tab of the ribbon. There is also a contextual tab that allows further customization of containers. Users can control how tightly the container bounds its contents by adjusting Margins or using the Fit to Contents command. Users can switch between different visual styles and change the position of the container heading. It is also possible to lock the container to prevent shapes from being added or deleted.

Selection
Because the shapes in a container are not grouped, users can directly click on shapes to select them. There is also a command in the Container Tools contextual ribbon and on container right-click menus to select all the shapes in a container at once. The container itself can be selected by clicking on the container heading or geometry. Typically, containers cannot be selected by clicking in their interiors (see the 




NoQuickDrag section below for more information).

Disbanding containers
When a container is moved, copied, or deleted the member shapes are also moved, copied, or deleted. Since deleting a container deletes the members of the container too, there is a Disband Container command in the Container Tools contextual ribbon and shape context menu. This command deletes the container without deleting the contents.
Boundary shapes
While members of containers are normally placed completely inside the container boundary, it is also possible to put shapes directly on the container boundary. The shapes are still considered members of the container, but they behave differently during resize actions. To put a shape on the boundary of a container, simply drag it there. Notice the difference in highlighting feedback between dragging a shape into a container versus onto the boundary. Boundary highlighting appears along a single edge of the container. Once a shape is on the container boundary it will move with that boundary. Users can resize the container and the shape will stay on the boundary.

Working with Lists
The Lists feature in Visio 2010 keeps shapes arranged in a sequence. Lists are a special form of Containers, providing many of the same capabilities as Containers but adding the automatic arrangement of member shapes. Unlike the Containers and Callouts features there is no way for end users to create a generic new list. However, a number of diagrams and features in Visio 2010 utilize Lists to arrange shapes.
List examples
Cross-functional Flowchart - This diagram is effectively a list of container 




shapes. Each 




swimlane is a container, and all the 




swimlanes belong to a list. This makes inserting, arranging, and reordering 




swimlanes simple.

Data Graphic Legend - This feature uses a nested combination of list and container shapes. An outer list includes containers for each data field in the legend. The containers have an inner list that includes each of the graphic symbols used to represent that data field.

Wireframe Diagram - A number of the user interface elements in the Wireframe diagram arrange shapes in lists. For example, menu bars and drop-down menus manage individual menu shapes.

List behaviors
Like containers, users add and remove shapes from a list by dragging them in or out of the list shape. An orange highlight rectangle appears around the list shape to denote membership, and an orange insertion bar indicates the specific position that a new shape will occupy. In addition to dragging shapes into a list, the user can click on a blue insertion rectangle on either side of the list to insert a new shape at the highlighted position. Shapes in a list can be reordered via drag and drop or the arrow keys on the keyboard.

Visio automatically keeps the members of a list properly positioned. Lists have properties for direction, spacing between members, and shape alignment that determine where members are placed. Some list shapes expose the same Container Tools contextual ribbon that container shapes use to provide options for margins and visual style. Moving, copying, or deleting a list will also move, copy, or delete the list members.
Working with Callouts
A callout is an annotation on a diagram that provides more information about a shape. Callouts are Visio shapes themselves, which differentiates them from other forms of annotation such as comments. Callouts are part of the visible drawing and can be edited and formatted like any other shape. A callout points at or references another shape, which is called the "target" of the callout. It is placed in proximity with its target and may have a line connecting to it. The connecting line is known as a "leader or 




“callout line".

To add a callout shape in Visio 2010, select the target shape on the page and then click on the Callout dropdown in the Insert tab. The Callout gallery on this tab has many different styles of callouts. Hover over a style to see it applied as a Live Preview and then click the style to add the callout. The callout appears slightly above and right of the target shape.

Callout behaviors
Callout shapes are not new to Visio 2010, but Visio 2010 gives callout shapes special 




behaviors. When a target shape is moved, copied, or deleted any callouts attached to the shape will be moved, copied, or deleted too. Thus callouts stay with their target shapes, though users can reposition the callout to any offset from its target. Callout shapes are also designed to be displayed in front of other shapes. Even if newer shapes that overlap with callouts are added to a page, the callouts will appear in front.
Callout Customization
There are additional options for the visual style of callout shapes, which can be accessed by right-clicking on a callout. The Callout Style 




flyout menu allows users to switch to a different geometric style and has the same choices as the Insert Callout gallery in the ribbon. The Orientation 




flyout menu determines which side the callout's leader attaches to. Callout Line controls the visibility and placement of the leader. Resize with Text determines whether the callout shape resizes to fit the amount of text in the shape.
