Selecting a shape within group

  • Thread starter Budi Hartono Lie
  • Start date
B

Budi Hartono Lie

Hi,

I'm using C# and Visio 2003. I need to know how to select a shape within a
group shape. For example, I have two rectangles and one circle grouped
together, then I want to color one of them when user clicked on it. How to
do this? I have do the "get_SpatialSearch" and find the grouped shape;
searching within Shapes I find all the child shapes but how do I know that
one of them is currently selected?

Thanks in advance!
 
M

Mark Nelson [MS]

If the sub-shape in the group is actually selected, you don't need a spatial
search. Visio's Selection object can give you the selected shape. If the
sub-shape is not selected, but you just want to find out which sub-shape is
closest to some coordinate, you need a spatial search.

The key item when working with selection of group shapes is to set the
IterationMode property of the Selection object before you look at the shapes
in the selection. See the help topic on IterationMode for a full
explanation.
 

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