Sha256: 20a2e6bedb6a4a921bb73315031bee8746dd0ad6d4bcfc387181f3eb71004d68

Contents?: true

Size: 545 Bytes

Versions: 16

Compression:

Stored size: 545 Bytes

Contents

require_relative 'helpers/example_window'

# Example for Button and ToggleButton
class ExampleState < Fidgit::GuiState
  def initialize
    super

    vertical do
      my_label = label "Label", tip: "I'm a label"

      combo_box(value: 1, tip: "I'm a combo box; press me and make a selection!") do
        subscribe :changed do |sender, value|
          my_label.text = "Chose #{value}!"
        end

        item "One", 1
        item "Two", 2
        item "Three", 3
      end
    end
  end
end

ExampleWindow.new.show

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fidgit-0.2.4 examples/combo_box_example.rb
fidgit-0.2.3 examples/combo_box_example.rb
fidgit-0.2.2 examples/combo_box_example.rb
fidgit-0.2.1 examples/combo_box_example.rb
fidgit-0.2.0 examples/combo_box_example.rb
fidgit-0.1.10 examples/combo_box_example.rb
fidgit-0.1.9 examples/combo_box_example.rb
fidgit-0.1.8 examples/combo_box_example.rb
fidgit-0.1.7 examples/combo_box_example.rb
fidgit-0.1.6 examples/combo_box_example.rb
fidgit-0.1.5 examples/combo_box_example.rb
fidgit-0.1.4 examples/combo_box_example.rb
fidgit-0.1.3 examples/combo_box_example.rb
fidgit-0.1.2 examples/combo_box_example.rb
fidgit-0.1.1 examples/combo_box_example.rb
fidgit-0.1.0 examples/combo_box_example.rb