News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Hide subshapes based on either of two flags

Started by scott, May 15, 2008, 06:49:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

scott

Chris,
I recently reread your 2006 post about various ways to hide shapes. My question is a variation on that theme.

Basic situation: a group with several subshapes. Certain subshapes can be hidden in one of two ways: by setting a flag on the group or by setting a flag on the page.

Page flag: User.pgHideSub

Group flag: User.grHideSub

Subshape formula in Geometry1.NoShow: OR(<group>!User.grHideSub, ThePage!User.pgHideSub)

This setup works fine and hides the subshape if either flag is set to TRUE.

And now for the question: If the user sets the page flag to FALSE, I want to force User.grHideSub to FALSE as well. I can do this by creating another group cell called User.Watch_pgHideSub with a value of
     IF(ThePage!User.pgHideSub=FALSE,SETF(GetRef(User.shHideSub),FALSE),"")
While this works, is there a more elegant way that doesn't require the "watch" cell?

Visio Guy

Hi Scott,

Yeah, I know what you mean. Too many SETFs starts to feel weird.

One technique I used to use was to put a setting on the shape to "Use Page Setting", and had that as the default. So if you hide something via the shape, then it is an override of the page setting, and won't listen to the shape. But if you revert to "Use Page Setting", the shape is again a team player.

Not quite as flexible or powerful as yours, but slightly less 'icky'

For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 161 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1017KB.
Tokens: post-login.
Cache hits: 13: 0.00189s for 26,750 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]