Although some shapes have special behavior, you can usually add text to any shape by selecting the shape and typing. You don't even have to choose the Text tool first to add text to a shape. Visio always places the text you type in a shape's text block. The text block might be on top of, beside, or below the shape, but it is part of the shape nonetheless, as Figure 4-1 shows.
Figure 4-1. These built-in shapes position and format text appropriately—centered on the shape, below the shape, and so on. To add text to a shape, select the shape, and then type.
In general, to type text in any shape, follow these steps:
Visio zooms in to show you the text you're typing at 100% view. If you misspell or type a word that Visio doesn't recognize, the word appears with a wavy, red underline.
Don't worry if you type more text than the shape can contain. You can adjust the shape size, text block size, or font size later.
Visio doesn't place limits on the amount of text you can type in a shape's text block. The nice thing about this feature is that you can keep typing and worry about formatting later. If the text doesn't fit, you can do any of the following:
Later sections in this chapter provide details about formatting and resizing text and text blocks.
To disable automatic zooming and the spelling checker as you type, follow these steps:
Text appears smoother than in Visio 2000, but it's not as legible at different zooms.
When you zoom out to see more of your page, text in the diagram may not be legible, even if the same text was legible at that zoom when viewed in Visio 2000. New Visio users who need to see the entire drawing page at a time may wonder why it's so hard to read text at all. For example, perhaps you want to use the 50% zoom so that you can see more of a flowchart at once, yet still be able to read the text in your shapes.)
A couple of factors are responsible. Text in Visio 2002 is displayed differently on the screen than it was in Visio 2000. This version of Visio uses a new display technology called GDI+ that enhances font resolution on the screen by smoothing curves and edges with a technique called anti-aliasing. You can disable text anti-aliasing behavior, which makes text look the way it did in Visio 2000 and may make your text more legible when you zoom out. To do this, select Tools, Options. Click the View tab, and then select the Faster Text Display (Aliased) option.
When you type in a shape, Visio zooms in so that the text is legible, but then when you work in the drawing, you can't read the text anymore.
Let's say that you're using 12-point Arial text in your shapes. If you're used to working in Word, you know that 12-point type is plenty big enough to read. And it seems very readable when you first type in Visio until you click away and display the entire drawing, when the text is no longer big enough to read.
What's happening is that Visio automatically zooms to show you your shape at 100% size when you type in it, which means that your 12-point type looks like 12-point type. When you click away from the shape or press Esc, Visio returns to the magnification that you were using for your drawing. If you just started your diagram, Visio is probably displaying the full page so that you can see all of your drawing, but at this zoom level, 12-point text is not legible. You can use the Zoom list on the Standard toolbar to zoom in and out in your drawing to see shapes and text up close. Regardless of the zoom level, when you print your diagram, that 12-point type will be printed at exactly that size.
You can type anywhere on a page when you use the Text tool. For example, if you want to type a note in a diagram, you can select the Text tool, click where you want the text to appear, and then start typing, as Figure 4-2 shows. You can also drag with the Text tool to create a text block in the size you want.
Figure 4-2. To add text anywhere on a page, click the Text tool, drag out a text block, and then type. The text wraps as you type according to the width of the text block you dragged.
To add text anywhere on a drawing page, follow these steps:
Visio zooms in to show you the text you're typing at 100% view.
Visio creates a text-only shape and formats your text using the default settings. Unless you change these settings, the default format is centered, Arial, 8-point text.
When you add text to a shape, the text always appears in a text block. However, the size, shape, and location of a text block can differ from those of its shape. In other words, the text block's geometry and position do not have to conform to the shape it's in. This is a really powerful idea, because it gives you complete control over where text appears in relation to a shape.
If you want to see a shape's text block, click the Text Block tool, and then click the shape. If you draw a shape, its text block has the same boundaries as the shape itself. For example, let's say you draw a rectangle. If you select the rectangle and then start typing, text appears centered in the rectangle pretty much as you'd expect. The rectangle's text block occupies the same area as the rectangle. However—and this is pretty cool—it doesn't have to appear this way. You can move, resize, and rotate a shape's text block without affecting its shape. The text remains part of the shape, but its location in relation to the shape is up to you, as Figure 4-3 shows.
Figure 4-3. When you select a shape with the Text Block tool, Visio displays selection handles for the text block alone, which can differ in size, shape, and location from its shape.
If you're used to working in a word processing program like Microsoft Word, you may find Visio's text behavior a little surprising. Here are a few fun facts about Visio text tools that you can take advantage of:
If a shape already includes text and you want to add more, or select parts of the existing text, it's easiest to use the Text tool.
When you use the Text tool to type on the page, the text is automatically placed in a shape without lines or fill—in other words, a text-only shape. Because a text-only shape is still a shape, you can format it, and its text block, as you would any other shape. You can even add lines or fill.
Some unlikely Visio objects turn out to have text blocks, as Figure 4-4 shows. For example, connectors and other 1-D shapes have text blocks, which allows you to add text to line, spline, arrow, or callout shapes. Even guides and guide points can have text. (Try it—drag out a guide, and while it's still selected, start typing.)
Figure 4-4. Many objects in Visio can have text, including guide lines, guide points, imported objects, and clip art.
Just as a shape has width and height values that you can view and change in the Size & Position window, a shape's text block has width, height, and other properties that you can see in the ShapeSheet window. When you use the Text Block tool to move, rotate, or resize a text block, Visio records your actions in the cells of the Text Transform section. Most people need never display the ShapeSheet window, but shape programmers can take advantage of this architecture to write formulas that control text behavior. For example, one common type of text formula prevents a text block from moving or rotating when a callout shape is stretched. The text remains right side up regardless of the direction that the line points.
For an introduction to ShapeSheet formulas, see "Writing ShapeSheet Formulas."
Is there a way to distinguish "model space" text from "paper space" text as some CAD programs can do?
Visio doesn't display text the same way as CAD programs do. Text is displayed in your drawing using its printed size. When you zoom in and out, text looks larger and smaller, but only the view, not the text size, is changing. Changing the drawing scale also has no effect on text size, which is always measured in the real-world units of the printed page.
Many Visio shapes are really groups, and often they contain text that you can customize. For example, many of the title block shapes in the Borders And Titles stencil are groups. Typically, groups work the way you expect them to, and text is added in an appropriate format and location. You don't have to think about it—except when you do. Maybe you see text on a shape that you want to change, but can't figure out how to get at it. In times like these, you've probably encountered a group. With a little background information about how groups handle text, you can better predict the text behavior of existing Visio groups.
Groups associate shapes in a unique manner that you can take advantage of in your own diagrams. For example, if you want a way to keep blocks of text together, and yet format each block differently, you should create a group. You create a group by selecting Visio objects, and then choosing Shape, Grouping, Group. Because the group itself is a separate object with a text block, it can have text. Each shape in the group can also have text. And each shape's and group's text can be formatted differently. In this way, you can have multiple text blocks in an object that appears to be one shape, as Figure 4-5 shows. You can subselect shapes in the group to type text in them. Only a group can have more than one text block, as you see in Figure 4-5: one for the text area and one for the title.
Figure 4-5. The Note Box shape from the Borders And Titles stencil is really a group.
To see a group's text block, select the group, and then press F2. Visio opens the group's text block. To type in one of the group's shapes, subselect the shape, and then type. Sometimes a group has been protected so that you can't add text to it. It's safe to assume that the shape designer had a good reason for locking the shape, but such protection can be frustrating if you want to add text. Fortunately, there are workarounds for this issue. For example, you can use the Text tool to create a text-only shape containing the text you want, drag it into place atop the group, and then group the text and the group. Or you can try to bypass the protections.
For details, see "Editing Shapes in a Group."