Sha256: faa8e71a891b534b2a7d36ce235fc6a4e1a845b7a745e14a0beed105b5661307
Contents?: true
Size: 452 Bytes
Versions: 9
Compression:
Stored size: 452 Bytes
Contents
require 'ffi-tk' Tk.init label = Tk::Label.new(Tk.root, text: 'Press any key to open the dialog') label.pack Tk.root.bind('<Key>'){ answer = Tk.message_box( message: 'Really quit?', icon: :question, type: :yesno, detail: 'Select "Yes" to make the application exit') case answer when :yes exit when :no Tk.message_box( message: 'I know you like this application!', type: :ok) exit end } Tk.mainloop
Version data entries
9 entries across 9 versions & 1 rubygems