Visio Guy

Visio Discussions => Visio 2010 Issues => Topic started by: spyrule on July 23, 2013, 07:24:43 PM

Title: resizing small text, keep it centered?
Post by: spyrule on July 23, 2013, 07:24:43 PM
Hey guys,

I'm doing a very large data-center diagramming and because of the sheer amount of information I have to track(1 rack per 8x11" sheet), I'm stuck using very small 6pt fonts.
One of the issues I'm running into, and I do not know how to avoid it; is resizing text area so that the text remains centered in the resized box (see attached image for reference).

Now, the only reason I'm doing this is because I am creating some of my own shapes, and it's easier to move around a group of shapes if their areas are more easily discernable. If I put a text over a circle for example, with the normal sized box, I have a huge left-side of the text box that I can grab with, however I don't WANT that extra space.

Any help is appreciated on how to avoid this.
Title: Re: resizing small text, keep it centered?
Post by: Jumpy on July 24, 2013, 06:32:00 AM
When you go into the textformat or texttransform section of the shapesheet of such a shape, you can see that there are cells for padding. Left, right, top, bottom. Maybe a too big value there is the problem?
Title: Re: resizing small text, keep it centered?
Post by: spyrule on July 24, 2013, 12:38:27 PM
yeah, I changed that, and set them all to zero... not sure why it was set that high (4pt), however it still ends up with the text at the bottom, with a really high space above the text. Although that's easier to work with.
Title: Re: resizing small text, keep it centered?
Post by: Jumpy on July 24, 2013, 03:01:38 PM
You could try adjusting the height of the texbox using a formula ala =Textheight(TheText)...
Title: Re: resizing small text, keep it centered?
Post by: wapperdude on July 24, 2013, 03:58:34 PM
It looks like the textbox is too small for the font size to behave in a predictable fashion.  Adding to what Jumpy said, place the following formula to the Txtwidth cell (in TextTransform section):  textwidth(TheText).  Then, you need to play with the formulas for TxTLocPinX and TxtLocPinY.

For example, the TxtLocPinX might get a formula:  =MAX(Char.Size/4,TxtWidth/2).  This should correct for single or multiple characters.  There may be issues with single char, hence Char.Size/4.  Oh, you may also have to work with the TxtPinX settings too.

Since the behavior is less than predictable, you may have to adjust the entries to get an acceptable solution.  Don't be surprised if it's also sensitive to the font selected.

Good text behavior reference:  http://msdn.microsoft.com/en-us/library/aa200986(v=office.10).aspx

Wapperdude