
Customizing Visio Shapes:
Word Balloon
Shape Example
Tony Zilles In another article Chris Roth showed how
setting one field on the shape sheet allowed you to manipulate shape vertices without
affecting the shapes alignment box.
The word balloon example demonstrates how to create a shape with
elements outside the alignment box that are flexible and can be moved without affecting
the alignment box in any way.
What's the point I hear you say? Well, the alignment
box sets the reference points for shape alignment on a page for one. Being able to swing
certain geometry around without resizing the alignment box makes for a drawing that
maintains shape alignment and looks good. Providing standard shapes with controlled
flexibility also makes for a better looking drawing and consistent presentation.
This example shows you how to create a cartoon-style
word balloon with a free-range pointer. Where ever you move the pointer, the word balloon
remains fixed and of constant size.
Create the word balloon
- Using the rectangle tool, draw a rectangle.
- With the rectangle selected, right click and select Show
ShapeSheet.
- Viewing the Geometry1 section of the ShapeSheet,
select cell X1. Right click and select Insert Row After. This will insert
a new vertex on the shape.
- Select a cell in the new node (say X2), right click
and select Insert Row After again.
- Repeat the above again. You now have three new
vertices in the shape.
- Select Geometry 1.X3 and in the text box under the
toolbars in the Visio windows change the value to =Height*-1. This drops
the pointer down and makes the shape look a little more like a word balloon at last. It is
only suggested as an option and is not a mandatory part of this exercise.
Add a control
- In the ShapeSheet, right click and select Insert
Section.
- A dialog box will appear, check Controls
and click OK. A new 'Controls' section will appear in the ShapeSheet.
- In the Controls section, insert the value 2
in both X and Y Behavior cells. This fixes the control handle point at a constant offset
from the shape's left and bottom alignment. Other values you can use in the behavior field
are listed below.
- In the Tip cell insert ="Reposition
pointer".
- In Geometry1.X3 insert the formula =Controls.XDyn
and in Geometry 1.Y3 insert the formula =Controls.YDyn. These settings
tie the vertex coordinates to the control point.
- In the Protection section set LockCalcWH
to =1

This fuzzy old ShapeSheet screen grab highlights
the areas where changes are made to create the word balloon from a regular rectangle
shape.
Testing it out
Click in the drawing window and select the shape. A
control handle will appear on the pointer vertex. Placing the cursor over it will display
a tip indicating what the control does. Clicking on the control and dragging it will
relocate the pointer.
Experiment resizing the shape to see the effect of
the value in the X and Y Behavior cells.
Settings for the X and Y Behavior Cells in Controls Section
| Value |
Control handle
behavior when shape is stretched |
| 0 or 5 |
Moves in proportion to the
shape when the shape is stretched. 0; handle is visible; 5; handle is invisible. |
| 1 or 6 |
Moves in proportion to the
shape, but cannot be moved horizontally (X Behavior) or vertically (Y Behavior). 1; handle
is visible: 6; handle is invisible. |
| 2 or 7 |
Offsets a constant distance
from the shape's left side (X Behavior) or bottom (Y Behavior). 2; handle is visible: 7;
handle is invisible. |
| 3 or 8 |
Offsets a constant distance
from the shape's center. 3; handle is visible: 8; handle is invisible. |
| 4 or 9 |
Offsets a constant distance
from the shape's right side (X Behavior) or top (Y Behavior). 4; handle is visible: 9;
handle is invisible. |
Tony Zilles
Download the sample file (balloon.zip - 4.24kb)
See Designing Outside the Box
for more information on this topic
Check The Old Radial Offset Fill
Trick - a variation on the same theme.
|