Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: jimdoria on May 24, 2010, 03:45:05 PM

Title: Keep fixed shape position within group?
Post by: jimdoria on May 24, 2010, 03:45:05 PM
Hi -

I'm sure this has been asked and answered before, but I've searched through the forums here and on Google and haven't been able to find a solution.

I'm trying to create a shape with a "flag" - the flag is a small shape that is never scaled and always appears in the upper-right corner of another shape (a rectangle).

I've managed to get it mostly working, except for when the group is resized vertically. The "flag" shape always ends up drifting down from the corner as the height of the rectangle is increased.

(http://zeta.jimdoria.info/images/visio_flag_problem.jpg)

I've tried tying the PinX of the flag to the height of the rectangle and the PinX of the rectangle. I've tried setting different ResizeMode settings, I've tried setting DontMoveChildren to True on the group. Nothing is working.

Can someone give me an idea of what I'm doing wrong? Thanks!
Title: Re: Keep fixed shape position within group?
Post by: Paul Herber on May 24, 2010, 04:24:19 PM
Here's an example attached.
Title: Re: Keep fixed shape position within group?
Post by: Yacine on May 24, 2010, 04:27:26 PM
Hi Jimdoria,
the fastest would be to
1) set the behaviour of the flag to reposition only
2) set it's pinX+Y to top-center (my flag is rotated by -45°)
3) in the shapesheet set it's width and height to guard(a number)
Title: Re: Keep fixed shape position within group?
Post by: Yacine on May 24, 2010, 04:29:12 PM
Bah, he is your's  ;D ;D ;D
Title: Re: Keep fixed shape position within group?
Post by: vojo on May 24, 2010, 04:55:23 PM
flag piny = guard(sheet.7!height - 4mm)

This will hold the flag at a fixed offset from the upper "edge" of the hosting shape.
Can do same for pinx so that flag is always at the edge  pinx = guard(sheet.7width - 3mm)
Title: Re: Keep fixed shape position within group?
Post by: jimdoria on May 24, 2010, 04:57:12 PM
Thanks for the replies, everyone! I'm looking at them now... Get back soon  ;)