Sha256: 64abb67ca9e018a0f44f7df81ac379aa2b875aa7e3dc9f2501a2b66d7c215e1e

Contents?: true

Size: 370 Bytes

Versions: 9

Compression:

Stored size: 370 Bytes

Contents

require 'ffi-tk'

Tk.init

variable = Tk::Variable.new('showstopper', false)
label = Tk::Label.new(Tk.root, text: 'enter anything to reflect it here').pack

entry = Tk::Entry.new(Tk.root, textvariable: variable).pack
button = Tk::Button.new(Tk.root, text: 'Exit'){ exit }.pack

loop do
  Tk::Wait.variable(variable)
  label.configure text: variable.to_s
end

Tk.mainloop

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ffi-tk-2010.08.23 example/wait.rb
ffi-tk-2010.08 example/wait.rb
ffi-tk-2010.06 example/wait.rb
ffi-tk-2010.03 example/wait.rb
ffi-tk-2010.02 example/wait.rb
ffi-tk-2010.01 example/wait.rb
ffi-tk-2010.01.02 example/wait.rb
ffi-tk-2009.12.14 example/wait.rb
ffi-tk-2009.11.29 example/wait.rb