Enable/Disable buttons without changing the background

Hello all, I need help with some blocks… On my quiz app, I set that you can respond only once on a question, after that you get to the next one, I set that the buttons get disable after you respond and they get enable back when you get the next question… the only problem is that the background color get grey when they get disable… I found some other topics that told us to disable the function that the button does, I understand what they meant, but I can’t find the block that they were using… the topic was old and I don’t know how to make that blocks… Can someone help me please?
Thanks in advance!

Can you share a link to your project? Or some screenshots so we can see the behaviour yoy are explaining :grinning:

https://x.thunkable.com/copy/28375d033c3c6398a48d8afccb136e96

This is what I did so far

Are you setting the background of of your buttons? After the update I don’t see the set button background anymore.

@mantarosiegabrielq55
I think if you want to disable a button without changing it’s appearance then you should create a button group and set up some kind of flag in your code to manage the onClick handler for the group. I really like groups for buttons and this is one of those reasons. see the video below for more context/detail

the flow/logic for conditionally controlling the button press would be like follows:

Like
on group click,
if var allowClick = true
do a bunch of stuff
else
do nothing

@zander here it is :slight_smile:

2 Likes

I do the enable disable for the button with the use of a group but in a slightly different way.

enable-disable

I add an empty group that covers the button and keep it hidden. When I want to disable the button I show the group component which covers the button so when the user clicks, the group is clicked not the button.

This way you can achieve the disable feature without changing the button color.

2 Likes

Just to add to this, the group has to be above the button in the component tree for it to block the click action right?

1 Like

yes, it should be.

See the sample project
https://x.thunkable.com/copy/13c9c6fe0b9dd944868746f16612ea70

1 Like