Sha256: ef53c21b21c41af16b3bcb53a30b1cc573bec78e47d2f4dcc1e674897ed73602
Contents?: true
Size: 725 Bytes
Versions: 25
Compression:
Stored size: 725 Bytes
Contents
# Almost same code as sample22.rb : http://shoes-tutorial-note.heroku.com/html/00508_The_Widget_class.html require '../lib/green_shoes' class Answer < Shoes::Widget attr_reader :mark def initialize word flow do flow(width: 70){para word} @mark = image('./loogink.png', width: 20, height: 20).hide end end end Shoes.app width: 200, height: 100 do stack width: 0.5 do background palegreen para '1. apple' ans = answer '2. tomato' para '3. orange' button('Ans.'){ans.mark.toggle} end stack width: 0.5 do background lightsteelblue para '1. cat' para '2. dog' ans = answer '3. bird' button('Ans.'){ans.mark.toggle} end end
Version data entries
25 entries across 25 versions & 1 rubygems