Right Click Option Menu question

Started by ThirdDimension, October 06, 2016, 07:47:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ThirdDimension

Hi everyone,

I have built several shapes that have right click menu option items to select.  Is there a keyboard control to keep the right click options menu open while selections are made?  It would be nice to select all appropriate options at once with out having the box immediately close after each selection .............

thanks 3rd D

JohnGoldsmith

Hi,

Short answer is no, there isn't (as far as I'm aware).  If you're after some controls to be active when there's an active selection it sounds more like a Ribbon  scenario or possibly a task pane (both of which are code options).

Best regards

John
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

wapperdude

Another work around might be custom properties.  Normally you enter some value or select from a list.  So, give each entry a Boolean true/false selection.  The choice would trigger appropriate response.  Not elegant, but avoids code and/or messing with the ribbon, plus the window won't close immediately.

Wapperdude
Visio 2019 Pro

vojo

 I recall the dirx, diry, x behave, y behave ....one of the two pair....worked like this

Values between something like 0 to 5 defined the relationship and showed the control handle
values between something like 6 to 10 defined the relationship but hid the control handle

Look the settings for those cells in help

From their, an action can enable / disable

If (action.checked = true, <0 to 5>,<6-10>)

I used this something like 10 years ago...had an isocube where, based on action, one
could use controls or one could use custom props to set X,Y,Z

Hey Ken

Hey, 3rd:

   Let me suggest something obvious: create shapes that mimic a right click menu.  Here's one way:

   Let's say you have five options, so stack up five rectangles that look like a right click menu.  Add a checkbox alongside each one (available from one of the stencils), group each checkbox/rectangle pair, and add a doubleclick action to each group that checks/unchecks the box.  Add a sixth rectangle (no checkbox) at the bottom of the menu that says "Go!" which, when doubleclicked, triggers VBA to erase the mimicked menu and do whatever your selected right click options do.  And a "Cancel" option might be nice, too.

   Yes, you'd need some way to initially invoke your mimicry, such as double click or a single right click option on your original shape, but once the menu was there it'd stay.  And you could always get fancy with VBA via the Mouse Down event to do things with a single click.

   Overkill, perhaps, and it needs VBA; but it'd do the trick.  I can think of no other way.

   Good luck!

    - Ken

Ken V. Krawchuk
Author
No Dogs on Mars - A Starship Story
http://astarshipstory.com

wapperdude

@HeyKen:  very imaginative!  This could be made to work.  Perhaps the initial right click menu selection would launch the pseudo-menu shape.  But, this is a lot of work.  Added work for each shape that needs this fake menu shape.  Ouch.

Nonetheless, very creative! 

Wapperdude
Visio 2019 Pro

vojo

this might help

right click for all the actions
- note the line about enabling/disabling connection points
- note the lines about groups of props.

this was designed and worked well for visio 2003

Since 2013 is a step backward, no guarentees....don't do much with blades any more


Hey Ken

Wapperdude:

   Thanks for the kind words.  My reputation for pushing the envelope on Visio remains intact!

   Yes, each shape would need work to be able to access the fake menu, but depending on the particular solution you choose, it may not be much work at all.  For example, if you use the doubleclick event on the shapesheet, it's just an addition of one CALLTHIS/RUNMACRO/whatever function to EventDblClick.  If you're using the VBA MouseDown event, all you'd need to do is check the selected shape for the existence of some sort of identifying flag, say, a User.FakeMenu cell—if it exists, display the fake menu; if not, don't.

   Either way it's only necessary to diddle with one shapesheet cell, which can be saved with the master.  One and done!  It's a solution even a lazy, keystroke-avoiding nerd like me can appreciate.

   Thanks again,

   - Ken

Ken V. Krawchuk
Author
No Dogs on Mars - A Starship Story
http://astarshipstory.com