# How to use 2 buttons to do something? and how to change the button colors and back?

**URL:** <https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649>\
**Category:** Questions about Thunkable X\
**Created:** [July 1, 2019, 10:59am UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649 "2019-07-01T10:59:28Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yukold](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/yukold/32/35122_2.png) [@Yukold](https://community.thunkable.com/u/Yukold)\
**Post date:** [July 1, 2019, 10:59am UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/1 "2019-07-01T10:59:28Z")

</div>

Hi guys…

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/9/e936207b74a69d16e11aedaf168441ef6c715a71.png)  
I need change the image when i use 2 buttons… so to show one image i need click in one of the first line and after in the second line (like A3, B2, C1, A2, B3, C2…)  
How i do this in blocks?

And i can change the colors from text and background when i click in the button, but i dont know how to back to normal settings when i click again…  
Example: Original button: Blue text and white background  
When i click: White text and black background  
When 1 click again: back to original settings (blue text and white background)  
its possible do this?

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [July 1, 2019, 11:09am UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/2 "2019-07-01T11:09:50Z")

</div>

If button 1 pressed down set variable to varibale +1, and if button 2 pressed down set same variable to + 1.

When timer fires check if variable = 2

if = to set image to source

else = do nothing

And if button up set variable - 1

---

<div class="post-metadata">

**Author:** ![Yukold](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/yukold/32/35122_2.png) [@Yukold](https://community.thunkable.com/u/Yukold)\
**Post date:** [July 1, 2019, 12:35pm UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/3 "2019-07-01T12:35:50Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/a/2a169db7cdb56a8afecd6c898ba679edf12613c6.png)

need other block to conect if before…

If possible show me this blocks you say in images please?

---

<div class="post-metadata">

**Author:** ![kartik\_old](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik_old/32/28305_2.png) [@kartik\_old](https://community.thunkable.com/u/kartik_old)\
**Post date:** [July 1, 2019, 1:26pm UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/4 "2019-07-01T13:26:25Z")

</div>

Hello!  
I have a short solution for you. plz refer below :

 ![temp](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/6/c6dbc4a58aec20123dd228311826788fbc46359d.png)

Hope it Helps 😉

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [July 1, 2019, 1:55pm UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/5 "2019-07-01T13:55:54Z")

</div>

change submit button to timer that fires every 100ms

---

<div class="post-metadata">

**Author:** ![Yukold](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/yukold/32/35122_2.png) [@Yukold](https://community.thunkable.com/u/Yukold)\
**Post date:** [July 1, 2019, 11:18pm UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/6 "2019-07-01T23:18:22Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/e/fe0d62d565141ef8795e5e56d17452c02361439a.png)

I do these blocks but in the app nothing that I thought happened

So, maybe I think you did not understand what I need so will put images now…

This is the app:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/7/872fea3cc5b8250477323426372fcba0f8d1e4a7.jpeg)

if i click A1 or 1a show this

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/9/49bc1b070c976484790f771c53a377a2ab4ffd75.jpeg)

If click B2 or 2B show this

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/d/9d179f324d505a91e4816d736c663649920b8d28.jpeg)

So need two buttons to show a image forever…

sorry if i do anything wrong from last posts…

---

<div class="post-metadata">

**Author:** ![Yukold](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/yukold/32/35122_2.png) [@Yukold](https://community.thunkable.com/u/Yukold)\
**Post date:** [July 1, 2019, 11:21pm UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/7 "2019-07-01T23:21:29Z")

</div>

If i click 1A and show the cat… when i click 2B he need back button 1 to normal (blue text and white background)  
I think to do this i will need do this:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/7/a7290e6fb4053c5bc94cddb8075edd2bb6fc5bc0.png)

i just are asking because maybe have a small code do back normal when i do another actions…  
and confirm if my thinking is right

---

<div class="post-metadata">

**Author:** ![kartik\_old](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik_old/32/28305_2.png) [@kartik\_old](https://community.thunkable.com/u/kartik_old)\
**Post date:** [July 2, 2019, 10:10am UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/8 "2019-07-02T10:10:23Z")

</div>

Hey there @Yukold, 👋  
Did you set timer enabled?

Try to do this :  
 ![temp](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/4/c43ad86a9f23d47e1c8fe4731d04a85c3b8404e7.png)

---

<div class="post-metadata">

**Author:** ![Yukold](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/yukold/32/35122_2.png) [@Yukold](https://community.thunkable.com/u/Yukold)\
**Post date:** [July 2, 2019, 4:04pm UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/9 "2019-07-02T16:04:05Z")

</div>

Of course I forgot to do this… thanks for a lot of patience with this dumb (me!)

---

<div class="post-metadata">

**Author:** ![farzam.parto](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/farzam.parto/32/32429_2.png) [@farzam.parto](https://community.thunkable.com/u/farzam.parto)\
**Post date:** [July 2, 2019, 6:32pm UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/10 "2019-07-02T18:32:09Z")

</div>

Hi @Yukold  
Take a look at this link, I made what you looking for:  
👉👉 [Link to project’s topic](http://community.thunkable.com/t/use-two-combined-buttons-to-show-image/129432) 👈👈

> **Summary**
>
> ![](https://i.imgur.com/pvRlVY9.png)
> 
> > User should select two buttons to cahnge the image
> 
> ![](https://i.imgur.com/Vqym1X3.png)
> 
> > When user click on one button, it’s change style and color. it’s disable other buttons which are in the same row
> 
> ![](https://i.imgur.com/gssItvU.png)
> 
> > When two buttons selected, little loading animation, apear before actual image shows up
> 
> ![](https://i.imgur.com/bKMYiTC.png)
> 
> > User can combine different combinations, such as A1, A2, A3, B1, B2, B3, C1, C2, C3 which will give you different results.

---

<div class="post-metadata">

**Author:** ![Yukold](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/yukold/32/35122_2.png) [@Yukold](https://community.thunkable.com/u/Yukold)\
**Post date:** [July 2, 2019, 6:40pm UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/11 "2019-07-02T18:40:11Z")

</div>

OMG Farzam, its very good!!  
So the problem: i need to click again the same button to unlocked other options… i need be more more fast and when i click another button he just go… (this system lock is a problem =/)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:12pm UTC](https://community.thunkable.com/t/how-to-use-2-buttons-to-do-something-and-how-to-change-the-button-colors-and-back/127649/15 "2024-11-08T12:12:25Z")

</div>


