Setting component opacity based on visibility of another component

Hi Team,

I would like to be able to get the visibility state of an icon on the screen (‘true’ or ‘false’) and using this, change the opacity of a different element on the screen.

The intention is to give the user a clear indication that a button has been selected by making the opacity of the entire imagine (1) when checked and (0.5) when unchecked to make the selection extra clear and visible.

An example of my thought process in codeless is below:

I’ve also made a short loom video to illustrate what I want to achieve.
https://www.loom.com/share/5cdb614770394b118eff194539d36bbe

The “check” icon appears correctly with the “Toggle Component Visibility” block but the logic to check visibility change opacity is where I need help please

Regards

Hi @Armandt_du_Preez



Try this option

Regards,
Valeriy

1 Like

Hi Team,

I’ve figured out how to get the desired results described above.

I used the following blocks to return the state of the visibility of the object (returns a true or false)
image

I then used this result to change the style of the object using the “opacity” property
image

And the final result looks as follows:
https://www.loom.com/share/2553463a463f4c379bde1e945230629a

Regards

Hi Valeriy,

Thank you for your response. Your suggestion works as well to achieve the results I needed

Regards