- This article is about dropdown menus used as inputs for blocks. For information on the creation of dropdown menus in Scratch projects, see How to Make a Dropdown Menu.
A dropdown menu is a list of options that appears in some blocks. It can be accessed by clicking on an upside down triangle in the block.
Scrolling Dropdown Menus
Sometimes, a dropdown menu will be so long that not all options can be viewed at once. Scratch 2.0 had small arrows at the bottom of the menu in these cases, which could be used to scroll through the dropdown menu upon being hovered over with the mouse. In Scratch 3.0, it is possible to scroll through a menu by simply using a mouse or the scroll bar at the side.
Dropdown Menus as Inputs
Sometimes, dropdown menus can be used as string or number inputs. These dropdown menus are rounded. For example, the go to ( v) block has a dropdown menu:
Block inputs
go to (random position v)
For this block, the dropdown menu can be used as an input as well, meaning that blocks can be dragged in, such as variables:
go to (variable)
Text Inputs
The (join () ()) block can be used as a workaround for the purpose of text input. Just leave the first part of the block empty and enter any text into the second part:
go to (join [][enter text here ...])
Text inputs can be useful for very long dropdown menus, in which entering text can sometimes be easier than scrolling down all the way.
Non-Input Dropdown Menus
Not all dropdown menus work as inputs. Many dropdown menus with a fixed number of options, like the variable blocks, will not work as inputs. These dropdown menus are rectangular. One example is the show variable [ v] block:
show variable [not an input v]
It is not possible to place a variable in that spot. However, some Scratchers have found a way around that by "hacking" various Scratch blocks. These could be obtained by editing the project.json file or importing them from another project. However, in Scratch 3.0, these dropdown menus can no longer be inserted with hacked blocks.
Blocks with Dropdown Menus
Accept Block Inputs
These blocks allow their dropdown menus to be used as inputs for other blocks:
go to (random position v)glide () secs to (random position v)point towards (mouse-pointer v)switch costume to (costume1 v)switch backdrop to (backdrop1 v)switch backdrop to (backdrop1 v) and waitplay sound ( v) until donestart sound ( v)broadcast (message1 v)broadcast (message1 v) and waitcreate clone of (myself v)touching (mouse-pointer v)?distance to (mouse-pointer v)key (space v) pressed?[backdrop # v] of (Stage v) // The first menu does not accept block inputs, but the second one does.play drum (\(1\) Snare Drum v) for (0.25) beatsset instrument to (\(1\) Piano v)change pen (color v) by (10)set pen (color v) to (50)video (motion v) on (sprite v) // Both menus accept block inputs.turn video (on v)set voice to (alto v)set language to (English v)translate [hello] to ( v)when (space v) key pressed:: makeymakeywhen (left up right v) pressed in orderwhen (A v) button pressed(A v) button pressed?when (moved v):: microbitdisplay ( v)when tilted (any v)tilted (any v)?tilt angle (front v)when pin (0 v) connectedmotor (A v) turn this way for (1) secondsmotor (A v) turn that way for (1) secondsmotor (A v) set power (100)%motor (A v) positionwhen button (1 v) pressedbutton (1 v) pressed?turn motor (A v) for (1) secondsturn motor (A v) for (1) rotationsturn motor (A v) onturn motor (A v) offset motor (ABCD v) speed to (100)%set motor (A v) direction (this way v) // Both inputs accept block inputs.motor (A v) position:: boostwhen (any color v) brick seenseeing (any color v) brick?when tilted (any v):: boosttilt angle (up v):: boostturn (motor v) on for (1) secondsturn (motor v) onturn (motor v) offset (motor v) power to (100)set (motor v) direction to (this way v) // Both inputs accept block inputs.when distance (\< v) (50)when tilted (any v):: wedotilted (any v)?:: wedotilt angle (up v):: wedowhen force sensor ( v)when tilted ( v):: gdxfortilted ( v)?:: gdxfortilted angle ( v):: gdxforspin speed ( v)acceleration ( v)
Do Not Accept Block Inputs
These blocks do not accept other blocks in their dropdown menus:
set rotation style [left-right v]change [color v] effect by ()set [color v] effect to ()go to [front v] layergo [forward v] () layerscostume [number v]backdrop [number v]change [pitch v] effect by ()set [pitch v] effect to ()when [space v] key pressedwhen backdrop switches to [backdrop1 v]when [loudness v] > ()when I receive [message1 v]stop [all v]set drag mode [draggable v][backdrop # v] of (Stage v) // The first menu does not accept block inputs, but the second one does.current [year v][abs v] of ()set [ v] to (0)change [ v] by (1)show variable [ v]hide variable [ v]add [thing] to [list v]delete (1) of [list v]delete all of [list v]insert [thing] at (1) of [list v]replace item (1) of [list v] with [thing]item (1) of [list v]item # of [thing] in [list v]length of [list v][list v] contains [thing]?show list [list v]hide list [list v]