An easy way to make a shape smart is to have it do something when you double-click it. For most Visio 2007 shapes, the built-in double-click behavior is to open the shape’s text block so that you can type. However, Visio 2007 provides several options that you can specify with the Behavior command on the Format menu, as Figure 25-8 shows. For example, you can configure a shape so that the Report dialog box opens when you double-click the shape.
Note
You can add double-click behavior to objects from another application that you’ve linked or embedded in Visio 2007. The OLE Verb option in the Behavior dialog box is available only when you select a linked or embedded object.
Displaying a Help File for a ShapeOne of the double-click behaviors that you can define for a shape is Display Help. This option is really designed for professional shape developers who want to link shapes to custom Windows help files (.hlp or .chm files). If you fall into this category, you must identify the help file and a topic in that file using the following syntax: filename!keyword or filename!#Number Filename is the name of the help file, such as MyShape.hlp or MyShape.chm. To locate a specific help topic in the file, you can specify either a keyword that is associated with the topic, or the ID number that is referenced in the MAP section of the help project file. |
Follow these steps to set a shape’s double-click behavior:
1. | Select the shape that you want to change. | ||||||||||||||||||||||
2. | |||||||||||||||||||||||
3. | Choose the action you want to happen when the shape is double-clicked. See Table 25-4 for a list of options and what they do.
| ||||||||||||||||||||||
4. | Click OK. | ||||||||||||||||||||||
5. | To test the new behavior, double-click the shape. |
Troubleshooting: The Custom option is not available, or the shape’s behavior doesn’t change when you select a double-click actionIf the Custom option is selected but appears dimmed, the shape already includes a custom double-click formula, which is defined in the ShapeSheet window. If you select a new option on the Double-Click tab, you can overwrite the custom behavior. However, if a custom formula is protected (such as by the GUARD function), specifying a different behavior on the Double-Click tab will have no effect. Visio 2007 ignores your setting when you click OK. No error message appears; your change is simply not implemented. |