Master Shape with Auto Resizing Text Boxes

Started by ramulose, May 19, 2015, 03:36:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ramulose

I am trying to create 2 new master shapes in Visio. They are very similar, with the functionality being exactly the same in both, with only a slight cosmetic difference between them.  It seems like it should be very simple, but I have been working on this for almost 2 weeks and haven't been able to work out an answer. I have searched the Internet extensively. I'm really hoping someone can help me with this.

The shape should have the following characteristics:
1. There should be two text boxes, one on top of the other
2. The two text boxes should be grouped so that they can not be sub-selected and either re-sized individually or separated from each other. (They can be sub-selected to type into the boxes)
3. Each text box should re-size automatically, vertically, and independently, to fit the text that is typed into that text box.
4. The width of the shape should be able to be manually changed by the user with the horizontal size handles.

This is a rough graphic of what it would look like.

|----------------|
|      Text      |<-- Automatically Re-sizes vertically
|----------------|
|     Text 1     |
|     Text 2     |<-- Automatically Re-sizes vertically
|     Text 3     |
|----------------|


The second shape should have these characteristics:
1. It should have the exact same behavior as the shape above
2. It should have 2 lines running horizontally down the left and right sides of the top box. These lines should re-size vertically when the top box re-sizes, but should keep their relative distances from the sides of the box when manually re-sized horizontally.
3. Text typed into the top box should be confined to the space between the two vertical lines. 

Here is a rough graphic of what it would look like:

|--|----------|--|
|  |   Text   |  |<-- Distance between lines and boundaries of box stay the same when re-sized horizonally
|--|----------|--|
|     Text 1     |
|     Text 2     |
|     Text 3     |
|----------------|


Obviously the vertical  lines wouldn't extend above and below their horizontal boundaries, but that's the best I could do using the pipe characters.

Help with this would be very much appreciated.

Thanks
We can't solve problems by using the same kind of thinking we used when we created them. - Albert Einstein

ramulose

Hello - An update on my first post.

I have the first shape almost working. The last problem I have to solve is that when I type text into the top box, and it gets taller to accommodate the new text, it looks like the underlying page is staying the same size. I get this dotted line where the top of the shape used to be, and my connection points are on the dotted line in the middle of the shape. I can't find any information on the Internet at all that explains how a master shape's page works.

One of the things I tried was making the Page Height = The Grouped shape's height. It looks like this:

PageHeight = GUARD(Sheet.5!Height*1)

Where Sheet.5 is my grouped sheet ID. That didn't change anything.

Can anyone help me with this. I am so close!!!!!
We can't solve problems by using the same kind of thinking we used when we created them. - Albert Einstein

ramulose

One last update.

I FIGURED IT OUT!!! It wasn't the underlying page that wasn't resizing it was the grouped shapes height. By setting the grouped shapes height equal to the height of the two shapes in the group added together, it worked.

Let me know if anyone needs this shape, I will be glad to share it.

We can't solve problems by using the same kind of thinking we used when we created them. - Albert Einstein

ThirdDimension

If you are willing to share, I would like to see it.

THANKS