Is it possible to make a multiple clicks i.e. a push-button (just like the Blynk app) which works like,
Single tap ON, another tap OFF
Thank You !
Is it possible to make a multiple clicks i.e. a push-button (just like the Blynk app) which works like,
Single tap ON, another tap OFF
Thank You !
You can make a variable āStateā which default value is Off. SO when button 1 click if global state = off then set button text to on and set state to onā¦ Hope it helped !!
He wants to do multiple functions with one button
What you are doing is using two buttons. He asked for a way to use one button with two states just like @Tekwizer explained.
I am still a learner
Just something like this will do.
One more smart way
Much smarter
This is the first time I see this āIf then elseā block in use.
It doesnāt seems useful when you donāt know about it. When I donāt know about this block then it seems useless for me. But when I understand this block and usage then it is very useful for me now.
There are many smarter way to work with these blocks. And really I love playing with these type of block that uses 100% of our mind.
Can you help with the blocks?
Iām just a beginner here and tried but doesnāt seem like iām doing it right.
Why donāt you show what you have tried? It is much easier to help you.
Most of the times his reply always with simple blocks ā¦ his solution will thinks as, Oh this like and all we could use the blocksā¦
As per the @iamwsumit answer you can set the text on the button.
If you follow @Peter answer answer you could add the following up process for ON and OFF
I tried this with a little piece of blocks. It is too easy
Understand the logic and made the blocks. It is just of 2 minutes.
A more simple method āwould be to have 2 buttons one for on and one for off
On button will be visible true and off button will be visible false.
Like this
Unfortunately though, i cant show you the resault cause the build servers are down again LOL
This is exactly what i did, but needed a better and effective solution
yea sometimes visible property gets stuck and doesnt changeā¦a more effective way which for me it works, is to change the button height like this
The zero height will make the on button disapear.
And if we set the on button height to its own height will make it apear and visa versa.
Now if your alignment is horizontal, you can do the same thing with the width instead