Elements in Shoes applications can respond to a number of events, the most common of which is the click event. Any element can be assigned a "click block," a block of code to run when the element is clicked. If the element is clicked, the click block will run. This can make any element--including text, images, or an entire stack or flow itself--behave somewhat like a button.
The following example assigns a click block using the click method. The click method assigns a click block to the entire enclosing element which, in a stack or a flow, would be the stack or flow itself. Alone, it will simply assign the click block to the entire application.
Shoes.app :width => 300, :height => 200 do
@box = stack
@box.append para("You clicked the window\n")