In this post, we take a break from Visio 2007 information and explore a peculiar shape design issue. If you have worked with Groups in Visio, you have probably encountered a situation where the shapes inside of a group just don't behave properly during resize. Sometimes you want shapes inside a group to resize with the group. Sometimes you don't. Visio provides a setting to control the resize behavior, but you may be surprised how it works. Enter ResizeMode.
ResizeMode is the name of the Shapesheet cell that controls shape resize within groups. This is presented as Resize Behavior in the Format > Behavior dialog. There are three possible settings for the resize behavior: Scale with group, Reposition only and Use group's setting.
A shape inside a group will have one of these three settings. Really there are just two behaviors (scale & reposition), with the third setting just deferring up to the group for its value. The default setting is Use group, which in turn defaults to Scale. So how does Scale and Reposition affect the resizing of shapes inside a group?
Scale allows the shapes inside the group to stretch as the group stretches. Reposition maintains the original size of the shapes but moves their center as the group stretches. Sounds straightforward enough, so what's the catch?
The catch is that ResizeMode only works when used BEFORE a shape is grouped. When a shape is put into a group, Visio uses ResizeMode to determine what formulas get applied to the shape to make it resize with the group. Changing ResizeMode later on has no effect on the resize behavior. Thus it is quite likely that users change the setting and then get frustrated when nothing happens. It's just not a good design.
Here is the Shapesheet view of what is happening. ResizeMode is a cell in the Shape Transform section. The default is 0 (Use group's setting). Reposition only is 1. Scale with group is 2. Below is the Shapesheet for a shape before it is grouped.
Below is the Shapesheet of a shape with ResizeMode = 1 that is then grouped. Notice that the Width and Height formulas are untouched, but the PinX and PinY depend on the group. This is the Reposition behavior.
Below is the Shapesheet of a shape with ResizeMode = 2 that is then grouped. Notice that Width and Height now depend on the group. This is the Scale behavior.
Changing ResizeMode in the Shapesheet and in the Format > Behavior dialog has no effect on these formulas. The setting only comes into play at the time the shape is added to a group. Visio has some work to do to clean up both the design and the documentation for ResizeMode. Hopefully this article explains what is really happening.