For the following script, draw what will be displayed.
page main () initialize display box→use horizontal layout box→set horizontal algin("left") box→set vertical align("top") boxed box→set width(10) box→set height(10) box→set border(colors→blue, 0.1) end boxed boxed box→set width(10) box→set height(10) box→set border(colors→red, 0.1) end boxed end page
For the following script:
page main () initialize ◳count := 0 display boxed box→set width(10) box→set height(10) if ◳count = 0 then box→set background(colors→black) else box→set border(colors→black, 0.1) end if box→on tapped(handler) where handler() is ◳count := ◳count + 1 end end boxed end page
draw what will be displayed when the app first starts.
draw what will be displayed after the user taps the button.
Create a script that initially displays some text, anything you want, and a single button, side-by-side centered in the screen. Tapping the button should make the text disappear.