How to ? : Dynamic grouping/ungrouping

A

Anne Nonyme

Hello,

I try to have same behaviour as the one visible in "Enterprise Application"
diagrams in Visio 2003:

a) Create a "Boundary" shape

b) Create a "Server" shape

c) Drag the "Server" shape onto the "Boundary" shape

d) As soon the cursor is inside the "Boundary" shape, the "Boundary" shape
gives a visual fitback, then the server is grouped with boundary.

e) Move the "Boundary", the "Server" will follow...

f) Drag the "Server" out of the "Boundary" to ungroup it.

Some one have sample code, pseudo-code or any information about this
behaviour ?

Thanks

Anne
 
K

Kari Yli-Kuha

Anne Nonyme said:
Hello,

I try to have same behaviour as the one visible in "Enterprise Application"
diagrams in Visio 2003:

a) Create a "Boundary" shape

b) Create a "Server" shape

c) Drag the "Server" shape onto the "Boundary" shape

d) As soon the cursor is inside the "Boundary" shape, the "Boundary" shape
gives a visual fitback, then the server is grouped with boundary.

e) Move the "Boundary", the "Server" will follow...

f) Drag the "Server" out of the "Boundary" to ungroup it.

Some one have sample code, pseudo-code or any information about this
behaviour ?

Nocode is required, it's plain shapesheet behaviour:

select "Boundary" shape (must be a group):
right-click -> Format Behaviour -> Behaviour tab -> tag "Accept dropped shapes"

select "Server" shape:
right-click -> Format Behaviour -> Behaviour tab -> tag "Add shape to group on drop"

Now when you move the "Server" shape over the "Boundary" shape, the boundary shape
"swallows" the server as part of itself, i.e. it becomes a subshape of the "Boundary" group.

/C
 
A

Anne Nonyme

Great!

Thanks

Anne

Kari Yli-Kuha said:
Nocode is required, it's plain shapesheet behaviour:

select "Boundary" shape (must be a group):
right-click -> Format Behaviour -> Behaviour tab -> tag "Accept dropped
shapes"

select "Server" shape:
right-click -> Format Behaviour -> Behaviour tab -> tag "Add shape to
group on drop"

Now when you move the "Server" shape over the "Boundary" shape, the
boundary shape
"swallows" the server as part of itself, i.e. it becomes a subshape of the
"Boundary" group.

/C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top