Visio Insights
The official blog of the Microsoft Visio product team

Where's my text control handle?

Where's my text control handle?

  • Comments 9

A Visio user posted a question in the newsgroups about the yellow text control handle on connector shapes.  Some connectors have a yellow handle and some don't.  What's going on?

Starting in Visio 2003, the built-in connector shape used by the Connector Tool was modified to include a text control handle.  If you start a blank drawing and click on the Connector Tool you should get this version of the shape.  Note that you must enter text on the shape before you see the text control handle.  This shape is named the Dynamic Connector. 

There are also a number of Visio stencils with a Dynamic Connector shape such as the one in the Basic Flowchart Shapes.  Unfortunately, many of these shapes were not updated with the new text control handle.  Diagrams created in previous versions of Visio would have connectors that did not have the text control handle either.  Furthermore, once you have any shape named Dynamic Connector in the document, Visio will use that shape for the Connector Tool.

All is not lost!  The text control handle behavior is relatively simple and can be added to any existing shape or master.  Here are the steps.  Go to File > Shapes > Show Document Stencil and double-click on the Dynamic Connector master shape.  Select the connector in the edit window and go to Window > Show Shapesheet.  Then go to Insert > Section and choose the Controls and Text Transform sections if they are enabled.  Click OK.  Now enter formulas in the cells as shown in the screenshot.  The downside of this is that connectors already on the page won't pick up all the behavior because they have some local formulas.

But there is an even better solution.  Download the attached Visio document to get a macro that will fix up your masters and shapes automatically.  The macro is designed to work on the active document.  Load the macro document, enable macros if you get a security warning, then switch back to your document and go to Tools > Macro > TextControlHandle > ThisDocument > AddTextControlHandle.  The macro looks for connectors that do not yet have a text control handle and sets one up.  The macro doesn't quite fix everything.  It doesn't dive into groups looking for connectors to fix.  You should now be able to draw with the Connector Tool and get text control handles.  Note that dragging out a Dynamic Connector shape from a stencil will give you the old connector not the new connector, so stick with the Connector Tool.

Thanks for the great newsgroup question!

 

 

Attachment: TextContolHandle.vsd
Leave a Comment
  • Please add 6 and 6 and type the answer here:
  • Post
  • You should add a note explaining that HideText is a cell in the Miscellaneous Section that controls the visibility of the text. The Xbehavior of the control point is set to 5 if there is no text or the text is hidden. Xbehaviors of 4+ hide the control point.

  • In my stencil I have a customized dynamic connector that already includes a text control handle. Two questions:

    1) Is there a way to tell Visio to use my dynamic connector as the default when someone selects the Connector Tool?

    2) Is there a way to tell Visio 2007's Autoconnect feature to use my dynamic connector instead of Visio's?

    Thanks --

    Scott

  • Visio uses a master called the "Dynamic Connector" when drawing with the Connector Tool and AutoConnect.  If you want your shape to be the dynamic connector master, open the document stencil and place your connector master there.  Then rename it to "Dynamic Connector".

    Mark Nelson

  • I want to make a diagram with dynamic connectors, but I would like to have text entries on both ends of the dynamic connector.

    Is this possible?

  • Yes, this is possible.  You need to make your own dynamic connector shape that has a group with one sub-shape.  The group has one piece of text, and the sub-shape has the other.

    Visio Team

  • Is it possible to use the Component & Connectivity Explorer that comes with the Process Engineering stencils with my own shapes.  I like the connectivity overview that this gives and would like to use it or make something like it for my own diagrams (based on my own shapes), but it seems to only work with the standard process engineering shapes.

  • Hi Peter,

    The Component & Connectivity Explorer are designed only to work with Process Engineering diagrams.  However, you may be able to convince Visio that your drawing is a Process Engineering diagram.  Start from the Process Engineering template and drop your shapes on it.  Then select your shapes and choose Shape Conversion from the Process Engineering menu.  The PE add-on should add the requisite settings to your shapes for use in the explorers.

    Mark Nelson

    Visio Team

  • Is there a way to constrain text to a shape bounds?  The TxtWidth property controls the width properly, but the TxtHeight property does not seem to constrain the text as I expect.  If the TxtHeight property is less than the space required, I would expect that the text would be drawn using ellipses and clipped by the text block.  Instead the text overruns the text block based on the alignments.

  • Hi Andy,

    Visio does not have any mechanism for text clipping.  The typical remedies are to grow the shape or shrink the text.  There are blog posts illustrating the techniques.  Another workaround is to truncate the text, but this requires some sophisticated Shapesheet expressions to estimate the number of characters to display.

    Mark Nelson

    Visio Team

Page 1 of 1 (9 items)