A list is a special type of container that maintains its members
in ordered sequence. When you drop an object into a list, it takes a
specific place before, between, or after existing members. Each list
member knows its relative position in the list.
Visio 2010 doesn’t provide a list gallery on the Visio 2010 Insert
tab in the same way that it provides a container gallery. Consequently,
creating a list either requires reusing an existing list shape or having
enough technical knowledge to make changes to the ShapeSheet. (For
more information about modifying the ShapeSheet, see the Appendix.)
In this exercise, you will add shapes to a list, and then
reorder the shapes within the list. For this hypothetical scenario, the
list shape is called My New PC; you will add
rectangular shapes that represent the software you will load onto your
new PC. Your goal for this exercise is to create a list that shows the
installation sequence for your new PC.
The shapes you will drop into the list have been prepared with two
special attributes:
-
Each shape displays the name of a software product. (The name
of the product is stored in the shape as shape data.)
-
Each shape displays its relative position in the list when it
is in a list. When the shape is not in a list, it doesn’t display
any number.
-
Drag Visio 2010 into the
list.
Tip
A list provides the same visual feedback—an orange border—as
a container when a shape approaches its interior.
The graphic on the left shows the list outlined as the Visio
2010 shape approaches. The graphic on the right shows the shape
inside the list. Notice that the shape now displays its ordinal
position in the list in front of the product name.
-
Because you can’t install Visio until after you’ve installed
Windows, drag Windows 7 into the
list, above Visio 2010.
As you approach the list with the Windows 7 shape, notice that
an orange insertion bar appears to tell you where you can add a new
list member. In this example, you can insert the new shape after the
existing shape (the following graphic on the left) or before the
existing shape (graphic in the center).
When you drop Windows 7 above Visio 2010, notice that each
rectangle displays its current position in the list. Visio 2010 is
now #2.
Tip
The blue triangle that appears at the end of the orange
insertion bar in the previous left and center graphics and in
several of the following graphics will be explained in the next
section.
-
Insert Office 2010 between
Windows 7 and Visio 2010.
-
Drop Mozilla at the end of
the list.
-
Drag Visio add-in until the
orange insertion bar appears below Mozilla, but stop when most of
the shape is still outside the list, as shown in the following
graphic on the left.
As you can see, moving a very small portion of a shape into a
list is sufficient to trigger membership in the list.
-
With Visio add-in in the
position shown on the left in the following graphic, release the
mouse button. When you release the mouse button from this position,
the shape jumps into the list as shown on the right.
The behavior demonstrated by the Visio
add-in shape highlights two differences between
containers and lists:
-
Container members can be located anywhere within a
container; list members are always in fixed positions.
-
Shapes that are dragged onto the border of a container can
be attached to the border; shapes cannot be attached to the
border of a list.
-
Drag Mozilla up so it is
located between Windows 7 and
Office 2010.
The following graphic on the left shows the Mozilla shape as
it is being dragged up the list; the graphic on the right shows the
result. Notice that when you release the mouse button each shape
immediately reflects its new position in the list.
As this step illustrates, you can not only add shapes to
specific positions in a list, you can rearrange the shapes within a
list.
Clean Up
Save your changes to the
Lists drawing, and then close it.
Although you aren’t likely to use a Visio list for the specific
purpose suggested by this exercise, you can probably imagine your own
applications for position-aware shapes.
The previous exercise used a vertical list with shapes
automatically placed from top to bottom. A Visio list can be either
vertical or horizontal and can order shapes in either direction within
the list. Although these attributes are controlled by parameters and
don’t require writing code, you can’t change them from the Visio ribbon;
you must make changes to the ShapeSheet for the list.