Unable to have shape dynamically change Transparency. ?? BUG ??

Started by Bubba2413, January 15, 2020, 09:13:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bubba2413

What am I missing?

I've added an action section that toggles  a user.row between true and false along with shape fill and line transparency based on that value.
The shapesheet seems to work ok, but the shape VISUAL DISPLAY never changes.

Oddly, when I change the values using the UI, the visual presentation performs as expected.  When I change using the action menu, the shapesheet values change, but the visual shape representation does not.

Cells used.
User.IsTrans ( FALSE|TRUE)

Actions.IsTrans
Actions.IsTrans.Action = SETF(GetRef(User.IsTrans),NOT(User.IsTrans))+SETF(GetRef(LineColorTrans),IF(User.IsTrans,50%,0%))+SETF(GetRef(FillForegndTrans),IF(User.IsTrans,50%,0%))+SETF(GetRef(FillBkgndTrans),IF(User.IsTrans,50%,0%))

Actions.IsTrans.Menu =  "&Trans"
Actions.IsTrans.Checked =  User.IsTrans

Paul Herber

It's a grouped shape. Here the UI and code work differently. The UI affects the whole shape, top-level shape as well as sub-shapes. Your code only affects the top-level shape. You need to make each sub-shape use the transparency of the top-level shape.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

vojo

at least on my machine with 2013, if you set transparency at group, all children go to color of white.

I either ungroup to transparency or put a "screen" shape in front and set that transparency (doesn't help if you want to see thru...but can diminish visual importance of the group)


wapperdude

Visio 2019 Pro

Bubba2413

Paul,
Thanks for your response.  At least I know I'm not doing something wrong.  It's unexpected behavior, and I'm gonna have to call it a 'bug'.
I had not considered different behavior for group vs non-group. 

As far as
Quote"You need to make each sub-shape use the transparency of the top-level shape..."

Great thought!  Sooo... I copied the master, renamed the copy, then edited the copy so that ALL the sub- and sub-sub-shapes  had relevant values pointing to the top level shape (Sheet.5) i.e.: 'sheet.5!<VALUE>'  Expecting, as we both thought, that all relevant sub-shape properties would follow the 'master' (sheet.5)  Interestingly, the behavior of the new master did NOT change. 

While editing the new master, I added a rectangle in the background so I could observe whether or not changing the properties of the various sub-shapes would have any impact.  It didn't. (I left the rectangle in there... just 'cuz.

ok... so.  What now Uber-Gurus?

Note that the 'Server' shape is only the 'whipping-boy' for this example.  I'm trying to do use this with other shapes as well, and am running into similar results.

vojo

sorry for being confusing.

On my system with 2013
- if you set transparency at the group level, ALL child shapes go to white
- if you set transparency of each child of the group manually, transparency on affects the specific child in play