How does SelectionChanged work?

M

Michael Pollard

I cannot find any documentation on SelectionChanged in the MSDN library other
than the actual syntax (and generic comments on Events as a whole). I am new
to Visio development. I just want to know when the selection changes, with
what was deselected and what was selected. This shouldn't be so hard.

All I need are the object IDs of the main objects, Selection.Item(1) before,
Selection.Item(1) after. I can select the new object using EventDblClick,
but that doesn't help with deselecting the old object. I want to make some
changes to each (selection indicators, larger and bolder than the ones Visio
uses, maybe later update a custom "custom properties" page). If I could
modify the way Visio did things, I would just do that instead, but I can't
find that either.

If SelectionChanged isn't the best/easiest way to this, please let me know.
 
M

Mark Nelson [MS]

Hi Michael,

The SelectionChanged event does not explicitly tell you what used to be in
the selection or what is currently in the selection. It is simple enough to
check the Selection object to get the current selection, but you will have
to cache this information yourself if you want to know what the previous
selection was.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

Michael Pollard

I guess that'll work.

Is there a good example I can look at for how it does work / how to use it?
Like I said, the documentation is sparse.
 

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