Author Topic: Keep fixed shape position within group?  (Read 4705 times)

0 Members and 1 Guest are viewing this topic.

jimdoria

  • Newbie
  • *
  • Posts: 3
Keep fixed shape position within group?
« on: May 24, 2010, 10:45:05 AM »
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.



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!

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2992
    • Paul Herber's website
Re: Keep fixed shape position within group?
« Reply #1 on: May 24, 2010, 11:24:19 AM »
Here's an example attached.
Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

Yacine

  • Hero Member
  • *****
  • Posts: 2715
Re: Keep fixed shape position within group?
« Reply #2 on: May 24, 2010, 11:27:26 AM »
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)
Yacine

Yacine

  • Hero Member
  • *****
  • Posts: 2715
Re: Keep fixed shape position within group?
« Reply #3 on: May 24, 2010, 11:29:12 AM »
Bah, he is your's  ;D ;D ;D
Yacine

vojo

  • Hero Member
  • *****
  • Posts: 1550
Re: Keep fixed shape position within group?
« Reply #4 on: May 24, 2010, 11:55:23 AM »
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)

jimdoria

  • Newbie
  • *
  • Posts: 3
Re: Keep fixed shape position within group?
« Reply #5 on: May 24, 2010, 11:57:12 AM »
Thanks for the replies, everyone! I'm looking at them now... Get back soon  ;)