Sha256: 4655b64d8dcced97a87520acbfa3dd1d478091bdc018c4cfca527f9c0b744dce

Contents?: true

Size: 927 Bytes

Versions: 116

Compression:

Stored size: 927 Bytes

Contents

# frozen_string_literal: true

require 'glimmer-dsl-libui'

include Glimmer

window('Form') {
  margined true
  
  vertical_box {
    form {
      @first_name_entry = entry {
        label 'First Name' # label property is available when control is nested under form
      }
      
      @last_name_entry = entry {
        label 'Last Name' # label property is available when control is nested under form
      }
      
      @phone_entry = entry {
        label 'Phone' # label property is available when control is nested under form
      }
      
      @email_entry = entry {
        label 'Email' # label property is available when control is nested under form
      }
    }
    
    button('Display Info') {
      stretchy false
      
      on_clicked do
        msg_box('Info', "#{@first_name_entry.text} #{@last_name_entry.text} has phone #{@phone_entry.text} and email #{@email_entry.text}")
      end
    }
  }
}.show

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
glimmer-dsl-libui-0.6.2 examples/form2.rb
glimmer-dsl-libui-0.6.1 examples/form2.rb
glimmer-dsl-libui-0.6.0 examples/form2.rb
glimmer-dsl-libui-0.6.0.pre.3 examples/form2.rb
glimmer-dsl-libui-0.6.0.pre.2 examples/form2.rb
glimmer-dsl-libui-0.6.0.pre.1 examples/form2.rb
glimmer-dsl-libui-0.6.0.pre.0 examples/form2.rb
glimmer-dsl-libui-0.5.24 examples/form2.rb
glimmer-dsl-libui-0.5.23 examples/form2.rb
glimmer-dsl-libui-0.5.22 examples/form2.rb
glimmer-dsl-libui-0.5.21 examples/form2.rb
glimmer-dsl-libui-0.5.20 examples/form2.rb
glimmer-dsl-libui-0.5.19 examples/form2.rb
glimmer-dsl-libui-0.5.18 examples/form2.rb
glimmer-dsl-libui-0.5.17 examples/form2.rb
glimmer-dsl-libui-0.5.16 examples/form2.rb
glimmer-dsl-libui-0.5.15 examples/form2.rb
glimmer-dsl-libui-0.5.14 examples/form2.rb
glimmer-dsl-libui-0.5.13 examples/form2.rb
glimmer-dsl-libui-0.5.12 examples/form2.rb