Blocking multiple selection in Stencil

M

Matt

Hi

My application automates visio. We have our own stencil with a number of
masters.
Is there any way to prevent user selecting multiple masters at a time.

regards

Matt
 
M

Matt

Matt said:
Hi

My application automates visio. We have our own stencil with a number of
masters.
Is there any way to prevent user selecting multiple masters at a time.

regards

Matt

:( i still didnt get the answer.

I will explain it more. My application has embedded visio control and i'm
subscribing some events to work it my own way.
When a shape is dropped into the page. i get the image and process it for my
application.
I want user to drop only one shape at a time. He should not select multiple
shapes and drag and drop to the page.

Can we prevent multiple dropping?
Iether we have to prevent user selecting multiple shapes from the stencil or
we have to prevent when he drops it.
Any idea ?

thanks

Matt
 
J

Josef Meile

I will explain it more. My application has embedded visio control and i'm
subscribing some events to work it my own way.
When a shape is dropped into the page. i get the image and process it for my
application.
I want user to drop only one shape at a time. He should not select multiple
shapes and drag and drop to the page.

Can we prevent multiple dropping?
Iether we have to prevent user selecting multiple shapes from the stencil or
we have to prevent when he drops it.
Any idea ?
I can think about two posibilities, but I haven't tried them myself:

1) Subscribe the SelectionChanged for the stencil window (the one with the
vss extension) and each time the event fires, check if the number of shapes
is greater than one; in that case, get only the first shape in the selection
object, deselect all shapes, and select the shape you got. -> I'm not sure if
you can subscribe event with the stencil Window. My best guess is that you
can do it since it is a Window object as well.

2) Subscribe the SelectionAdded event on the drawing Document and each time
the event fires, take the first shape on the selection object and delete the
rest.

I Hope it helps.

Regards
Josef
 

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