Sha256: 40c13053c91de7e0732307ecd7adc1ec32ea14af9f40f76416fd92e0f45da8dc

Contents?: true

Size: 532 Bytes

Versions: 8

Compression:

Stored size: 532 Bytes

Contents

# frozen_string_literal: true

require 'glimmer-dsl-libui'

include Glimmer

window('Basic Entry', 300, 50) { |w|
  horizontal_box {
    e = entry {
      # stretchy true # Smart default option for appending to horizontal_box
    
      on_changed do
        puts e.text
        $stdout.flush # For Windows
      end
    }
    
    button('Button') {
      stretchy false
      
      on_clicked do
        text = e.text
        msg_box(w, 'You entered', text)
      end
    }
  }
  
  on_closing do
    puts 'Bye Bye'
  end
}.show

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
glimmer-dsl-libui-0.0.15 examples/basic_entry.rb
glimmer-dsl-libui-0.0.14 examples/basic_entry.rb
glimmer-dsl-libui-0.0.13 examples/basic_entry.rb
glimmer-dsl-libui-0.0.12 examples/basic_entry.rb
glimmer-dsl-libui-0.0.11 examples/basic_entry.rb
glimmer-dsl-libui-0.0.10 examples/basic_entry.rb
glimmer-dsl-libui-0.0.9 examples/basic_entry.rb
glimmer-dsl-libui-0.0.8 examples/basic_entry.rb