Visio2000: ShapeSheet: Information on How to Use and Define Control Handles (279315)



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

This article was previously published under Q279315

SUMMARY

This article contains information about how to use the ShapeSheet to define control handle behavior.

To display the ShapeSheet of a shape, select the shape, and then click Show ShapeSheet on the Window menu. You can also enable developer mode to have right-click access to the Show ShapeSheet command. To have right-click access to the Show ShapeSheet command, follow these steps:

  1. On the Tools menu, click Options, and then click the Advanced tab.
  2. Click to select the Run in developer mode check box.
  3. Click OK.
Right-click any shape, and note that the shortcut menu now contains the Show ShapeSheet command.

MORE INFORMATION

A way to control shape behavior and to still provide users with great flexibility is to add control handles to a shape. Like selection handles, control handles are small green squares that users can select and move.

A shape responds to change in the control handle's position through the association of other ShapeSheet cells to this position. The real strength of control handles is that they let you take advantage of user input when designing shape behavior.

Many of the SmartShape symbols provided with Visio use control handles to give shapes this kind of enhanced behavior. For example, with a control handle, you can move part of a shape, drag a connecting line from a shape, or add control tips to help users know what to do.

Defining a Control Handle

In order to define a control handle's behavior, you have to set Geometry vertex formulas to refer to Controls.X(n), Controls.Y(n) cells. Here is a brief explanation of the behaviors you can manipulate:
  • Controls.X(n), Controls.Y(n) define the handle's position.
  • Controls.XBehavior, YBehavior define how a handle moves when a shape is selected.
  • Controls.XDynamics, YDynamics define the control handle's anchor point.
  • Controls.CanGlue defines whether the control handle can be glued to other shapes. If this value is set to TRUE, the control handle can be glued. If this value is set to FALSE, the control handle cannot be glued.
  • Controls.Tip displays a tip when the mouse is placed over the control. A control tip ideally should be no more than four words that complete the following sentence:

    Use this control handle to [verb] [object/adverb]

  • Miscellaneous.NoCtlHandles cell toggles the display of control handles on and off for the selected shape. Upon setting this cell to a nonzero value (TRUE), the control handles will not be displayed when the shape is selected. If the value is set to TRUE, the control handles are not displayed. If the value is set to FALSE, the control handles are displayed.
  • Miscellaneous.UpdateAlignBox controls recalculation of the alignment box whenever a control handle is moved.
To manipulate the X and Y behavior, you can use the following formulas:

X Behavior

The X Behavior cell controls the type of behavior the x-coordinate of the control handle will exhibit after the handle is moved. Listed are the available formulas:

ValueBehaviorDefinition
0ProportionalThe control handle can be moved, and it also moves in proportion with the shape when it is stretched
1Proportional LockedThe control handle moves in proportion with the shape but the control handle itself cannot be moved
2Offset from Left EdgeThe control handle is offset a constant distance from the left side of the shape
3Offset from CenterThe control handle is offset a constant distance from the right side of the shape
4Offset from Right EdgeSame as 0, but the control handle is not visible
5Proportional, hiddenSame as 0, but the control handle is not visible
6Proportional locked, hiddenSame as 1, but the control handle is not visible
7Offset from left edge, hiddenSame as 2, but the control handle is not visible
8Offset from center, hiddenSame as 3, but the control handle is not visible
9Offset from right edge, hiddenSame as 4, but the control handle is not visible

X Dynamics

The X Dynamics cell represents the x-coordinate for a control handle's anchor point in local coordinates. The anchor point is used for rubber-banding during dynamics.

Y Behavior

The Y Behavior cell controls the type of behavior the y-coordinate of the control handle will exhibit after the handle is moved. Listed are the available formulas:

ValueBehaviorDefinition
0ProportionalThe control handle can be moved, and it also moves in proportion with the shape when it is stretched
1Proportional LockedThe control handle moves in proportion with the shape but the control handle itself cannot be moved
2Offset from Left EdgeThe control handle is offset a constant distance from the left side of the shape
3Offset from CenterThe control handle is offset a constant distance from the right side of the shape
4Offset from Right EdgeSame as 0, but the control handle is not visible
5Proportional, hiddenSame as 0, but the control handle is not visible
6Proportional locked, hiddenSame as 1, but the control handle is not visible
7Offset from left edge, hiddenSame as 2, but the control handle is not visible
8Offset from center, hiddenSame as 3, but the control handle is not visible
9Offset from right edge, hiddenSame as 4, but the control handle is not visible

Y Dynamics

The Y Dynamics cell represents the y-coordinate for a control handle's anchor point in local coordinates. The anchor point is used for rubber-banding during dynamics.

Modification Type:MajorLast Reviewed:8/30/2002
Keywords:kbhowto kbinfo KB279315