Sha256: afacc7ff8552becfa089c850a0b0a2fdcc09f6afa104fa7fc43368d1610bca88
Contents?: true
Size: 777 Bytes
Versions: 8
Compression:
Stored size: 777 Bytes
Contents
# Almost same snippet as # http://shoes-tutorial-note.heroku.com/html/00526_The__state_style.html require '../lib/green_shoes' Shoes.app width: 570, height: 600 do src = IO.read File.join(DIR, '../samples/sample55.rb') background deepskyblue stack do caption strong ":state >> string" para '# sample55.rb' end eb = edit_box text: src, width: width, height: height*0.85, state: 'readonly' button('edit'){eb.state = eb.state ? nil : 'readonly'} b1 = button 'save', state: 'disabled' do file = ask_save_file open(file, 'wb'){|f| f.puts eb.text} if file end b2 = button 'password' do pw = ask 'Enter your password: ', secret: true (b1.state = nil; b2.state = 'disabled') if pw == 'Ruby&Shoes' end end
Version data entries
8 entries across 8 versions & 1 rubygems