Selecting group, when clicking shape inside grouped shape

D

Dalsgaard

Hi,

I have made my own shapes, that is added to a holder shape when dropped.

The problem is, some of the shape inside the the group need to be
selected when i click them, and other need to select the whole group
when i click them.

I made the holder shape Members first in the behavior selecting setting,
which works fine with the shapes that needs to be selected when clicked.

I was thinking of making a macro that is run when doubled clicked on the
other shapes. Is there a way to find out which group a shape is part of?
 
J

John Marshall, MVP

If this is a grouped shape, you can change the selection criteria to members
first so that the individual components can be selected.

If the group includes a shape that defines the boundaries of the group, you
can use VBA code that checks the spatial relationships of shapes (Is the
shape within the boundary shape?)

You can add a custom property to all shapes to indicate which group they
belong to.

John... Visio MVP

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 
D

Dalsgaard

Hi

My holder shape is the boundary, the group doesn't get any bigger than
that. But inside one holder i can have different shapes, click one of
them and i select the shape, click another one and i select the group.

My selection criteria is members first, that covers where i want the
shape to be selected, on click.

It's the other kind of shapes that's the problem. Inside the same holder
as the 'select shape on click', i would like to have another kind of
shape. When i click this one, the group is selected.

Is there a formula you can use in shapesheet under EventDblClick,
something like 'select(sheet.7)'?
Or can one make a macro, that is used to select the group of a clicked
shape?
 

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