Page 77 - 2617_JSSPS_C-7
P. 77

Step 13:  Click on the Blocks button in the top-right corner to switch to the Blocks Editor.
                 Step 14:  Click on the Button1 block from the Blocks palette to open its blocks.

                 Step 15:  Drag the when Button1.Click block to the workspace.
                 Step 16:  Click on the Canvas1 block from the Blocks palette to open its blocks.

                 Step 17:   Drag the set Canvas1.PaintColor to block and place it inside the when Button1.Click block.
                 Step 18:  Click on the Colors block from the Blocks palette to open its blocks.

                 Step 19:  Drag the red colour block and connect it to the set Canvas1.PaintColor block.
                           Similarly, add the given blocks to change the paint colour on the Canvas: when Button2.
                          Click, set Canvas1.PaintColor to blue; and when Button3.Click, set Canvas1.PaintColor to
                          green.

                 Step 20:  Click on the Button4 block from the Blocks palette to open its blocks.
                 Step 21:  Drag the when Button4.Click block to the workspace.

                 Step 22:  Click on the Canvas1 block from the Blocks palette to open its blocks.
                 Step 23:  Drag the call Canvas1.Clear block and place it inside the when Button4.Click block.

































                                                                                               App Development      75
   72   73   74   75   76   77   78   79   80   81   82