Sha256: 7bbf91e7be2e7c309ec9dc508a4f3bcd8ae55d3bffccf6da20c17ca01eae9403
Contents?: true
Size: 737 Bytes
Versions: 12
Compression:
Stored size: 737 Bytes
Contents
# Almost same code as sample22.rb : http://shoes-tutorial-note.heroku.com/html/00508_The_Widget_class.html require 'green_shoes' class Answer < Shoes::Widget attr_reader :mark def initialize word flow do para word, width: 70 @mark = image(File.join(DIR, '../samples/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
12 entries across 12 versions & 1 rubygems