[Solved] Set opacity of a group to 50 using variable

Hello !

I created a simple function that aims to change the opacity of a block from 100 to 50 by using a variable.
I tested the function and there is a problem : the opacity of my block doesn’t change…
All the parts of my blocks work individually but not when I put them together…

If anyone can help me, it would be most welcome !

Here is my block:

1 Like

Hi, welcome to Thunkable!

What is the starting rgba value for that group’s background color?

Just to be clear: setting the opacity for a group is only going to affect the background color of the group. It’s not going to affect the components inside the group. At least that’s my assumption based on what I know about groups. It would be nice if it did affect all embedded components.

Can you post a link to a simple project that demonstrates the issue you’re seeing?

1 Like

The Group component has its own opacity option. Use this one not the opacity of the color.

I only see “touch opacity” and changing that doesn’t seem to do anything. Where are you seeing a group opacity property?

This code fades the background color:

image

See the first screen of this project (it has your username):

https://x.thunkable.com/copy/f0d14e9895aab5d1f6a9c9e89ff9b6a7

2 Likes

Yes, this is the one. If you set the touch opacity to 100 then when you click on the group object it will not reveal what’s under it.

This is a new addition.

You can set it in the blocks and in the design panel as well! :slight_smile:

Screen Shot 2022-05-24 at 4.03.07 PM

Right but this is only related to a touch/click event, yes? So if you wanted to fade the opacity of a group without detecting a touch, you couldn’t.

2 Likes

Yes that’s what I was looking for.
Thanks a lot for your help !!!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.