Sha256: b8e531ba2e90ff4f12cc6a76a184d373c3a9a791d3ca6bb977f3ef3f0fe42eef
Contents?: true
Size: 754 Bytes
Versions: 16
Compression:
Stored size: 754 Bytes
Contents
require_relative 'helpers/example_window' class ExampleState < Fidgit::GuiState def initialize super vertical do my_label = label "No button selected" button("Deselect") do @group.value = nil end button("Select #7") do @group.value = 7 end @group = group do grid num_columns: 5, padding: 0 do 15.times do |i| radio_button "##{i}", i, width: 60 end end subscribe :changed do |sender, value| my_label.text = if value "Button #{value.to_s} selected" else "No button selected" end end end end end end ExampleWindow.new.show
Version data entries
16 entries across 16 versions & 1 rubygems