Visio Guy

Visio Discussions => General Visio => Topic started by: lizat on July 06, 2020, 03:06:55 PM

Title: Shape: a group of two, sizing independently
Post by: lizat on July 06, 2020, 03:06:55 PM
I have a shape on a stencil that is a small square box with a letter in it and a larger rectangle with text that the user will input.
The square box cannot be changed either in size or content, the text box cannot change width but may end up being multi-lined.
Is it possible to get the text box to expand it's height based on the content - I want it to grown vertically from the bottom of the box depending on the content.

Thank you
Title: Re: Shape: a group of two, sizing independently
Post by: wapperdude on July 06, 2020, 04:03:43 PM
Yes.  Takes some shapesheet editing.  Assuming you have Developer mode enabled.

Select the shape on the stencil and open for editing.  Open its shapesheet.  You'll need to make 3 changes:
A) in Shape Transform section:

      1> set LocPinY = Height*0
      3> set Height = guard(TxtHeight.    NOTE:  this is 3rd step.

B) in Text transform section:  (NOTE, you may have to Insert this section.  Right click within shapesheet, Insert section, Text Transform)
      3> enter formula:  TextHeight(The Text,Width)

That's it.