Click a text box to show a layer?

Started by paulmitchell1984, May 06, 2014, 02:56:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

paulmitchell1984

Hi  Guys

Im stills stuck with my issue but had a thought of doing it a different way...

Would i be able to put a text box on a visio diag that when i double click it would show a layer, ie if i clicked "1" it would shower layer "1", click txt box "2" its showes layer "2" etc?

ideally i wanted tick boxes to show a layer when selected then go away or / hide when de selected, but i cant seem to get the coding right for it.

Hope somebody can help as its bugging me now.

Thanks

Paul

wapperdude

Check this post: http://visguy.com/vgforum/index.php?topic=5586.msg22164#msg22164.

My last attachment gives various ways to do this:
  1.) Double click the button will toggle all images, i.e., a layer, on/off.
  2.) Right click any open space on the page will bring up a context menu that allows toggle all images on/off, i.e., those on a layer
  3.) Double click an individual shape will toggle the "image" associated with that shape.  In this case, it shrinks the associated image to zero.  A process not associated with using layers.

The context menu approach, (2) above, which uses "action" section of shapesheet, could be incorporated into the toggle button instead of the page.  The context menu could then have a layer listing to select what should be shown/not shown. 

One caution with layers:  Visio is inconsistent with layer assignment from page to page.

HTH
Wapperdude
Visio 2019 Pro

paulmitchell1984

thats pretty much what im after, just got to figure it out now, had a quick go yesterday and couldnt get it to work for some reason :S

Thanks

wapperdude

Regarding layers: 
  1.  The layer order is established according to the order that they were created. 
  2.  When in doubt, open the page shapesheet and scroll down to the layers section.  It will show all layers Visio thinks are valid and their order is as listed.

Wapperdude
Visio 2019 Pro

paulmitchell1984

Nope still cant get it to work, tried with a new sheet, just a box with number 1 in and a circle which i want to hide/appear.

wapperdude

I've modified my attached file such that the button does two things:
  1.  If all of the shapes are either visible or hidden, then double click action will toggle the shapes on/off
  2.  Right click the button will bring up context menu and allow selection of any image(s) to be hidden or viewed.

The individual shape double click behavior is unaltered and still collapses the image.

Removed the page behavior.

HTH
Wapperdude
Visio 2019 Pro

wapperdude

#6
...and for those who don't want to use layers, here's a version that only collapses the image shape.

The main advantage of NOT using layers is that the shapes are easily portable.  For example, create a new page, then copy images from original page and paste on new page.  Visio knows how to keep the shapes sync'd.  Not so with layers.  The formulas break with copy/paste.

Wapperdude
Visio 2019 Pro

grumpyguy6

Quote from: wapperdude on May 09, 2014, 04:23:27 PM
...and for those who don't want to use layers, here's a version that only collapses the image shape.

The main advantage of NOT using layers is that the shapes are easily portable.  For example, create a new page, then copy images from original page and paste on new page.  Visio knows how to keep the shapes sync'd.  Not so with layers.  The formulas break with copy/paste.

Wapperdude
@Wrapperdude, I know this is an old thread, but I'm hoping you're still around. I'm trying to do something similar to the OP but am not having any luck. I've looked at both the rev drawings you posted but still can't figure it out. How do I replace the "picture" with an actual text box? Or is that not possible?