Author Topic: Unable to have shape dynamically change Transparency. ?? BUG ??  (Read 129 times)

0 Members and 1 Guest are viewing this topic.

Bubba2413

  • Jr. Member
  • **
  • Posts: 19
Unable to have shape dynamically change Transparency. ?? BUG ??
« on: January 15, 2020, 04:13:27 PM »
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
« Last Edit: January 15, 2020, 04:15:38 PM by Bubba2413 »

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2823
    • Paul Herber's website
Re: Unable to have shape dynamically change Transparency. ?? BUG ??
« Reply #1 on: January 15, 2020, 04:51:28 PM »
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 and applications for Visio -

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

vojo

  • Hero Member
  • *****
  • Posts: 1323
Re: Unable to have shape dynamically change Transparency. ?? BUG ??
« Reply #2 on: January 15, 2020, 09:22:55 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3661
  • Ideas Visio-lized into solutions
Re: Unable to have shape dynamically change Transparency. ?? BUG ??
« Reply #3 on: January 16, 2020, 09:20:06 AM »
To search thru all shapes, see this http://visguy.com/vgforum/index.php?topic=8160.msg35299#msg35299

You can modify it for your needs.
Visio 2019 Pro

Bubba2413

  • Jr. Member
  • **
  • Posts: 19
Re: Unable to have shape dynamically change Transparency. ?? BUG ??
« Reply #4 on: January 18, 2020, 08:54:55 AM »
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.
« Last Edit: January 18, 2020, 08:58:24 AM by Bubba2413 »

vojo

  • Hero Member
  • *****
  • Posts: 1323
Re: Unable to have shape dynamically change Transparency. ?? BUG ??
« Reply #5 on: January 19, 2020, 03:29:09 PM »
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