Microsoft KB Archive/254600

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 12:52, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

PSS ID Number: 254600

Article Last Modified on 6/4/2003



The information in this article applies to:

  • Microsoft Visio 2000 Standard Edition
  • Microsoft Visio 2000 Professional Edition
  • Microsoft Visio 2000 Technical Edition
  • Microsoft Visio 2000 Enterprise Edition
  • Microsoft Visio Standard 5.0x
  • Microsoft Visio Professional 5.0x
  • Microsoft Visio Technical 5.0x
  • Microsoft Visio Enterprise 5.0x



This article was previously published under Q254600

SUMMARY

Text in most Visio shapes remains at a constant point size when you resize the shape. In some cases, however, you might want the text to change its size when you resize the shape, or the shape to change its size to accommodate the text that you type.

To establish a relationship between a shape's size and its text size, you add formulas to the shape's ShapeSheet window, as shown in the picture below:

[GRAPHIC: Picture showing increased text size after adding ShapeSheet formulas]

MORE INFORMATION

Adding Text Formulas in the ShapeSheet Window

The following procedures explain how to use the ShapeSheet window to create a relationship between shape size and text size.

To follow the procedures, you must be familiar with adding and editing ShapeSheet formulas. For information about the ShapeSheet window, click Visio Help on the Help menu, and then on the Index tab, search for "shapesheet."

NOTE: You can use any full Visio program to follow these procedures; however, this article uses Visio 5.0 menu commands. If you are not using a Visio 5.0 program, you need to adjust the procedure for your Visio program.

To make text point size dependent on a shape's height:

  1. Select the shape, and then click Show ShapeSheet on the Window menu.
  2. Right-click the ShapeSheet window, and then on the shortcut menu, click View Sections.
  3. In the Sections dialog box, click to select the Shape Transform and Character Format check boxes, and then click OK.
  4. In the ShapeSheet window, scroll to the Character section, and then click the Size cell to display its value in the formula bar.
  5. Replace the text in the formula bar with the following formula

    INT(TxtWidth*10)*1pt.

    and then press ENTER.

    NOTE: The number 10 in the formula is a variable. You can experiment with different values to find the proportions that you like.
  6. Close the ShapeSheet window. Test the formula by typing text into the shape and resizing it.

To make a shape's height dependent on the amount of text that you type into it:

  1. Start a new Visio drawing, and then with the Rectangle tool, draw a rectangle.

    This procedure uses a rectangle that is 2 inches wide by 1 inch tall.
  2. Click the Pointer tool, select the rectangle, and then click Show ShapeSheet on the Window menu.
  3. In the ShapeSheet window, add the following formulas:
    Cell Formula
    Width 2 in. (or the width you want)
    Height GUARD(MAX(1 in., TEXTHEIGHT(TheText,Width)))
    NOTE: The formula for the shape's height sets the minimum height of the shape to 1 inch. To change the minimum height, replace 1 in. with the value that you want.
  4. Close the ShapeSheet window. Test the formulas by typing several lines of text in the shape.


REFERENCES

For information about working with text and text blocks, click Visio Help on the Help menu, and then on the Index tab, search for "text."

Keywords: kbGraphxLink kbgraphxlinkcritical KB254600
Technology: kbVisio2000Search kbVisio500xSearch kbVisioSearch kbZNotKeyword3