How to show or Hide something on button click Thunkable Makeroid AppInventor

When ever we are designing an app we need to make app more dynamic to attract the peoples to use your app.
So we are going to say a tip today about to make your app more dynamic, Not only dynamic and useful but also save the space in your app.

That is the title of this post as you see how to show or hde something when button or something clicked.
So let's get started in steps.

Step1
For this you need to prepare something that which should be visible and non visible when particular action taken place.
Here we taken button as a command and label as visible and non visible Base component.

Step2
Now set the Base component visibilty to False


Step3
Now go to blocks page and drag and drop the When button.Click block.



Step4
Now attach the If then Block to When Button.click Block as shown below

Step5
Now Attach the Equal block to If Block as shown below


Step6
Now attach the Label.Visible block to left of the Equal block and True block to the right of Equal block as shown below.

Step7
Now drag and attach the set Lable.visible block to Then Block And attach False block to Set Lable.visible block as shown below.

Step8
Now copy the Whole If then block and replace the True block with False block and False block with True block as shown below and attach thewhole block to Button block.

That's it the Lable will be shown and hide on random clicks of button.

using the same process we can show or hide any component easily.


Happy tHunking😎😎

Post a Comment

0 Comments