View Single Post
  #13  
Old July 21st, 2009, 02:25 AM posted to microsoft.public.visio.general
Jac Tremblay
external usenet poster
 
Posts: 23
Default Custom shapes with special behaviour

Hi WapperDude,
I checked again your solution and find it very interesting. But if I place
that form on a stencil, instances created from it do not work the same way
the original did. The text cannot be edited any more. The repositioning are
ok though.
Another thing: the small rectangle in that solution is placed at the top
left corner of the big rectangle, inside of it. How should I modify the
formulas if I wanted the small rectangle to be outside the big one (the base
of it would be the top of the big rectangle)?
I will try to find the answer by myself in the mean time.
Thanks for comment and your time.
--
Jac Tremblay


"WapperDude" wrote:

Just for the sake of having an optional way to do this, it is possible to do
it without grouping. The steps are basically the same as John indicated,
except you don't need to change the re-size mode, and you don't group. Let's
say the large rectangle has an ID =1, and small rectangle is ID=2.

Select and open small rectangle shape sheet.
Set PinX = guard(sheet.1!PinX)
Set PinY = guard(sheet.1!PinY).
Set LocPinX = width*0
Set LocPinY = height*1

Select and open large reectangle shape sheet
Set LocPinX = width*0
Set LocPinY = height*1.

This gives the same functionality as the grouping technique bit now either
shape is selectable with a single click.

HTH
Wapperdude


"Jac Tremblay" wrote:

Hi John,
As I can see, there is not much I can do. Actually, I wanted a rectangular
shape with a small rectangle at the top left corner. That small one would
always be the same size and would stay at the top left corner of the big
rectangle no matter how the big one is resized.
I guess I will forget about my idea.
Thank you for your answer, it is very appreciated.
--
Jac Tremblay


"John Goldsmith_Visio_MVP" wrote:

Hello Jac,

Checkout this blog post:

http://blogs.msdn.com/visio/archive/...esizemode.aspx

Best regards

John


John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk


"Jac Tremblay" wrote in message
...
Hi,

I use Visio 2003 and 2007.

I want to know if it is possible to create a custom shape from two
rectangles (for example) grouped together and have only one rectangle be
resized when the custom shape is resized?

I do not want the user to have to ungroup the components to do the job.

Thanks for any help.
--
Jac Tremblay