Author Topic: Shape: a group of two, sizing independently  (Read 225 times)

0 Members and 1 Guest are viewing this topic.

lizat

  • Jr. Member
  • **
  • Posts: 12
Shape: a group of two, sizing independently
« on: July 06, 2020, 10:06:55 AM »
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

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3822
  • Ideas Visio-lized into solutions
Re: Shape: a group of two, sizing independently
« Reply #1 on: July 06, 2020, 11:03:43 AM »
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.
« Last Edit: July 06, 2020, 11:06:44 AM by wapperdude »
Visio 2019 Pro