Sha256: d3505035ebc46eec25f72a1b5bf6ee5d8584ad44fb305adfbe557bb82e2e134f

Contents?: true

Size: 800 Bytes

Versions: 24

Compression:

Stored size: 800 Bytes

Contents

# Original code was written by Cecil Coupe
# He shared that in Shoes ML: http://librelist.com/browser//shoes/2011/2/17/radio-checked-method-broken/#1197b650c7dfdae2bc7c76bd9dad7e0e

require '../lib/green_shoes'

Shoes.app width: 300, height: 300 do
  background gold..deeppink, angle: 45
  @opt = 'none'
  r1 = radio :grp do
    @opt = "First"
  end
  para "Radio 1", width: 70
  r2 = radio :grp do
    @opt = "Second"
  end
  para "Radio 2", width: 70
  r3 = radio :grp do
    @opt = "Third"   
  end
  para "Radio 3", width: 70

  stack do
    para "Default is #{@opt}"
    # Set default for Radio Group :grp
    r3.checked = true
    button "Do My Bidding" do
      @p.text += "Aye, Aye. Using #{@opt}\n"
    end
    para "Choices follow\n"
    @p = para
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
green_shoes-1.0.337 samples/sample48.rb
green_shoes-1.0.331 samples/sample48.rb
green_shoes-1.0.322 samples/sample48.rb
green_shoes-1.0.320 samples/sample48.rb
green_shoes-1.0.309 samples/sample48.rb
green_shoes-1.0.303 samples/sample48.rb
green_shoes-1.0.282 samples/sample48.rb
green_shoes-1.0.273 samples/sample48.rb
green_shoes-0.263.0 samples/sample48.rb
green_shoes-0.255.0 samples/sample48.rb
green_shoes-0.243.0 samples/sample48.rb
green_shoes-0.233.0 samples/sample48.rb
green_shoes-0.227.0 samples/sample48.rb
green_shoes-0.226.0 samples/sample48.rb
green_shoes-0.221.0 samples/sample48.rb
green_shoes-0.214.0 samples/sample48.rb
green_shoes-0.207.0 samples/sample48.rb
green_shoes-0.201.0 samples/sample48.rb
green_shoes-0.198.0 samples/sample48.rb
green_shoes-0.189.0 samples/sample48.rb