The block palette is an area of the Scratch User Interface located to the left of the Code Area. The blocks are located to the right of the block categories, which can be clicked to automatically scroll to that category. The whole list can be scrolled through.
Using the Palette
By selecting the "Code" tab in the upper area of the Scratch program, the block palette will be opened. The block palette consists of every block that is built into Scratch. Some of the blocks take on certain values by default in their parameters, but others are variably controlled depending on the context of the associated sprite's current values. For instance, clicking and manually moving a sprite will adjust the x and y coordinate values within various motion blocks to its current position.
Note: | Moving a sprite via blocks will not adjust the coordinate values within the blocks in the block palette. |
In the block palette, built-in reporter variables such as direction and x position have a checkbox present adjacently to the left of them in the palette. By clicking on this checkbox, it displays that variable on the stage, not in block form, but in the form of its output value. By unchecking the box, it will hide that variable from the stage. Even when a different sprite is selected from the sprite pane or the stage, the variable display will remain present on the stage if it was previously checked.
Blocks can be clicked and dragged into the scripting area via any pixels on the block aside from drop-down arrows. One must click the mouse on a block and hold that click until the mouse pointer has reached the scripting area, after which it can be released to place a block in the code area. One does not need the entire block to be contained within the area, as the code area will adjust its dimensions to accommodate the block. If a block was grabbed by mistake, simply drop it back into the block palette to remove it.
Right-clicking on a block in the palette does not open up anything, contrary to the many options that show up by right-clicking a block in the code area.
Hiding the Block Palette
The only way to hide the block palette is to select either the "Costumes" or "Sounds" tab in the upper area of the Scratch program. This will replace the block palette and associated scripting area with either the Paint Editor or Sound Editor. This is due to most monitors having insufficient width to accommodate all of Scratch's features in one display. The tabs provide a mechanism by which certain parts of the program can be hidden or revealed rapidly.
Categories
- Main article: Block Categories
To the left of the area with the blocks is an area with block category names below their block colors in a big circle. Clicking these will automatically scroll the palette to its own category. If Extensions are open, the area will expand to fit the extensions.
Other Features
- Main article: My Blocks
The ability to create custom blocks was introduced in Scratch 2.0. The button by which this feature is accessed can be found in the My Blocks category in the block pane. Unlike the other panes, this one by default has no blocks in it; end user-created blocks will be present once they are made. To make a custom block, one must click the "Make a Block" button, from which a window will open where parameters can be entered.
Extensions
- Main article: Extension
On the bottom-left of the palette is a purple button, which can be clicked to open up the Extensions Library. One can select an extension, and additional blocks will appear.