Author Topic: Option: Drag & drop only if the shape was selected  (Read 2151 times)

0 Members and 1 Guest are viewing this topic.

Thomas Winkel

  • Full Member
  • ***
  • Posts: 180
Option: Drag & drop only if the shape was selected
« on: May 03, 2016, 05:05:23 AM »
Hi,

Imagine you have a lot of small shapes in front of a big shape.
Nothing is selected.
Now you want to move, delete, copy & paste, etc. some of the small shapes.
You could select them with the "Ctrl" key.
But this is not a good usability when the shapes are really small or if you have to select a lot of shapes.
What you really want to do is start a selection mask with the mouse.
But this is not possible with the mouse over a shape (the big one).
Visio will directly select and drag this shape.

I would like to have an option: File > Options > Advanced > Editing Options > Select before drag
Default: off

When this option is set Visio would start a selection mask:
* If there is no shape below (as before).
* If a underlying shape is not selected.

Only if the underlying shape was selected before, Visio would start a drag & drop operation.
A single click without moving the mouse would select the underlying shape.

I know that there are workarounds:
* Container
* Background page
* Assign the big shape to a layer and lock the layer

Best regards,
Thomas

Hey Ken

  • Full Member
  • ***
  • Posts: 173
  • Just This Guy
    • Ken Krawchuk, Libertarian for Pennsylvania Governor
Re: Option: Drag & drop only if the shape was selected
« Reply #1 on: May 03, 2016, 07:55:36 AM »
Thomas:

   I currently find myself in this same situation, and let me pass along the workaround I’ve been using.  And as you might guess, it (usually) involves fewer operations than the suggestions in your short list.

   The situation is a dynamic screen flow map I’ve built with hundreds of screenshots.  Having put the map together, we’re now using it to define the upgraded screens.  That means inserting new buttons, covering up old ones, adding fields, links, and text, covering old ones, and lots of other tweaks to each original screenshot.  The result is one big picture shape at the back with lots of little shapes all over the front of it.  I can’t tell you how many times I’ve missed clicking the little shape and grabbed the big one by mistake, then it’s ctrl-Z to the rescue.

   My workaround is to simply click anywhere off page, then lasso the little shape(s) I’m interested in.  I’ve been doing it so often these days that it’s become almost automatic.  (Emphasis on the “almost”.)  The only downside with the approach is that I sometimes hit the scroll bar and everything shifts.  No ctrl-Z rescuing available against that!

   Never thought of automating a solution until you mentioned it.  The obvious choice, and one in keeping with my predilection to avoid doing anything I don’t have to do, is to tweak the double click trick I recently mentioned.  Specifically, if you click on a shape that’s a substantial fraction of the page size, say 50% or more, you use VBA to unselect it after the first click, then only select it for real on the second click.  I already have a stencil-based form set up where I specify options, so I could turn it on and off there, and define the percentage of a page that triggers the behavior.

   Seems no biggie.  If I find the time, let me give it a shot. 

   - Ken


Ken V. Krawchuk
Libertarian for Pennsylvania Governor (retired)
KenK4Pa.com

AndyW

  • Sr. Member
  • ****
  • Posts: 315
    • PC Mimic Diagram
Re: Option: Drag & drop only if the shape was selected
« Reply #2 on: May 04, 2016, 02:47:17 AM »
You would have to automate this yourself using the Visio.Window events for MouseDown and MouseUp. Setting CancelDefault will stop Visio processing the event. So on mouse down get the starting co-ordinates and on mouse up get the ending co-ordinates, then just find all the shapes contained in the area and add to a selection.
Live life with an open mind