App logic
This section of the tutorial implements the necessary logic to make the app interactable.
Click on the
Blocks
tab.
The Blocks tab allows you to write block codes. You can access all of your palettes or components inside the Blocks tab.

Click on the
Button1
component and drag and dropwhen Button1 click
block.

From
Control
, drag and drop aif
block

Click on the gear icon on the
if
block and drag and drop aelse
block inside theif
block

From
Logic
block, find the equality testing operator and connect it with theif

Click on the
Button1
and find a block calledButton1.Text
, drag and drop it on the first jigsaw puzzle box.

In the next jigsaw box, drag and drop an empty text from the
Text
block, and typeHide
The text should match with your button text.

Click on the
Image1
block and drag and drop a block calledset Image1.Visible
, fromLogic
, drag and drop thefalse
block and connect it with theset Image1.Visible
block

Click on the
Button1
block and locate the blockset Button1.Text
, drag and drop the block below the previous block and connect aText
block with the textShow

Right click on the
Set Image1.Visible
block and duplicate it. Move the duplicated block inside theelse
block and changefalse
totrue

Right click on the
set Button1.Text
block and duplicate it. Move the duplicated block inside theelse
block and changeShow
toHide

Last updated
Was this helpful?