Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

arrow_back Pen Size Adjustment


In this add-on, you will let the user adjust the size of the pen.

The users drawing in your program might want a smaller pen to do more detailed work, or a bigger pen to color in large areas.

To change the pen size, select the pencil sprite, and drag out a "change pen size" block.

Test it out.

Click the block, then draw a line with the pen.

Change the value in the block to 5.

Click the block again, then draw a line.

Notice how the line gets thicker.

To let the user change the pen size without having to click this block, add a "when key pressed" event.

From the dropdown menu, select the up arrow key.

Now the user can make the pen bigger by pressing the up arrow key.

To make the pen smaller, add another "change pen size by" block.

Change the value to negative 5 to decrease the size of the pen.

Add a "when key pressed" event, and select "down arrow."


Now the user can adjust the size of the pen using the up and down arrow keys.

Now it's your turn: Program the up and down arrow keys to make the pen bigger and smaller.

Choose an Add-On
Color Picker (Part 1 of 2)
Lets the user change the color of the pen.
Color Picker (Part 2 of 2)
Lets the user change the color of the pen.
Pen Size Adjustment
Allow the users to change the size of the pen.
Monkey Animation
Make the Monkey do a little dance and introduce the game.
Draw inside the lines
Make it impossible to draw outside the white spaces.
Sound Effects
Add sound to your game.
arrow_backward Back
Next arrow_forward
  1. Choose an Add-On, and click "watch" to learn how to build it.
  2. Once you finish one Add-On, try another one below the video!