# Enable/Disable buttons without changing the background

**URL:** https://community.thunkable.com/t/enable-disable-buttons-without-changing-the-background/1984964
**Category:** Questions about Thunkable X
**Tags:** beginner
**Created:** [August 3, 2022, 2:02am UTC](https://community.thunkable.com/t/enable-disable-buttons-without-changing-the-background/1984964 "2022-08-03T02:02:36Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![mantarosiegabrielq55](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@mantarosiegabrielq55](https://community.thunkable.com/u/mantarosiegabrielq55)
#### Post date: [August 3, 2022, 2:02am UTC](https://community.thunkable.com/t/enable-disable-buttons-without-changing-the-background/1984964/1 "2022-08-03T02:02:36Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![zander](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@zander](https://community.thunkable.com/u/zander)
#### Post date: [August 3, 2022, 4:31am UTC](https://community.thunkable.com/t/enable-disable-buttons-without-changing-the-background/1984964/2 "2022-08-03T04:31:47Z")

</div>

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

---

<div class="post-metadata">

### Author: ![mantarosiegabrielq55](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@mantarosiegabrielq55](https://community.thunkable.com/u/mantarosiegabrielq55)
#### Post date: [August 3, 2022, 7:14am UTC](https://community.thunkable.com/t/enable-disable-buttons-without-changing-the-background/1984964/3 "2022-08-03T07:14:44Z")

</div>

[https://x.thunkable.com/copy/28375d033c3c6398a48d8afccb136e96](https://x.thunkable.com/copy/28375d033c3c6398a48d8afccb136e96)

This is what I did so far

---

<div class="post-metadata">

### Author: ![zander](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@zander](https://community.thunkable.com/u/zander)
#### Post date: [August 5, 2022, 1:41am UTC](https://community.thunkable.com/t/enable-disable-buttons-without-changing-the-background/1984964/4 "2022-08-05T01:41:50Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [August 5, 2022, 3:34pm UTC](https://community.thunkable.com/t/enable-disable-buttons-without-changing-the-background/1984964/5 "2022-08-05T15:34:29Z")

</div>

@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 🙂

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [August 5, 2022, 3:57pm UTC](https://community.thunkable.com/t/enable-disable-buttons-without-changing-the-background/1984964/6 "2022-08-05T15:57:53Z")

</div>

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

![enable-disable](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/5/c5125cd8d36c195f0842fb998d37f67bc437582d.gif)

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.

---

<div class="post-metadata">

### Author: ![zander](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@zander](https://community.thunkable.com/u/zander)
#### Post date: [August 5, 2022, 4:14pm UTC](https://community.thunkable.com/t/enable-disable-buttons-without-changing-the-background/1984964/7 "2022-08-05T16:14:52Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [August 5, 2022, 4:18pm UTC](https://community.thunkable.com/t/enable-disable-buttons-without-changing-the-background/1984964/8 "2022-08-05T16:18:48Z")

</div>

> [@zander](#):
>
> the group has to be above the button in the component tree

yes, it should be.

See the sample project  
[https://x.thunkable.com/copy/13c9c6fe0b9dd944868746f16612ea70](https://x.thunkable.com/copy/13c9c6fe0b9dd944868746f16612ea70)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [November 3, 2022, 4:19pm UTC](https://community.thunkable.com/t/enable-disable-buttons-without-changing-the-background/1984964/9 "2022-11-03T16:19:14Z")

</div>

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