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 3 Guests 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