Logo Message Boxes.

Logo can be used to construct a wide variety of GUI (Graphical User Interface) objects. It also has several ready made GUI dialog boxes. These are a useful way to allow users to select options within the flow of a program.

These commands can be found in the Windows functions/Predefined Windows section of the help file contents list.

Basic message box

messagebox [This is a message box.][Useful for writing irritating messages like this one. ]

Yes/No Box

yes/no box
This gives the user something to choose between.
It uses an ifelse structure.

to yesbox
ifelse YesNoBox [Square or Triangle?] [
Yes to draw a square. No draw a triangle.][repeat 4 [ fd 100 rt 90]][ repeat 3 [ fd 100 rt 120]]
end

Choice Box

This allows the user to select between several options. It uses an if structure based on the choice selected.

to choicebox
localmake "choice selectbox [Choose Shape.] [Triangle Square Pentagon]
if :choice = 1 [repeat 3 [fd 100 rt 120]]
if :choice = 2 [repeat 4 [fd 100 rt 90]]
if :choice = 3 [repeat 5 [fd 100 rt 72]]
end

Question Box

This allows the user to type in an answer or numerical value.

show questionbox [Please enter an answer][Do you like LOGO]

Last updated 23rd February 2010