Sha256: 5c09679533ea765ac42b79ef65c3596db9cfc641aa07631c9ea1c34ad085976d
Contents?: true
Size: 429 Bytes
Versions: 9
Compression:
Stored size: 429 Bytes
Contents
require 'ffi-tk' Tk.init label = Tk::Label.new(Tk.root, text: 'Here will be the value of button displayed') label.pack var = Tk.option_menu('.foo', 'Yes', 'Of course', 'Maybe', 'Maybe not', 'No', 'Never') Tk::Pack.pack('.foo') Tk::Bind.bind('.foo', '<Configure>'){ label.configure(text: var.get) } var.set 'Maybe' # initial option label.configure text: var.get Tk::Button.new(Tk.root, text: 'Exit'){ exit }.pack Tk.mainloop
Version data entries
9 entries across 9 versions & 1 rubygems