mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 14:34:39 +02:00

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
14 lines
421 B
Ruby
14 lines
421 B
Ruby
#!/usr/bin/env ruby
|
|
require 'tk'
|
|
require 'tkextlib/iwidgets'
|
|
|
|
ds = Tk::Iwidgets::Dialogshell.new(:modality=>:none)
|
|
|
|
ds.add('OK', :text=>'OK', :command=>proc{puts 'OK'; ds.deactivate})
|
|
ds.add('Cancel', :text=>'Cancel', :command=>proc{puts 'Cancel'; ds.deactivate})
|
|
ds.default('OK')
|
|
|
|
TkButton.new(:text=>'ACTIVATE', :padx=>7, :pady=>7,
|
|
:command=>proc{puts ds.activate}).pack(:padx=>10, :pady=>10)
|
|
|
|
Tk.mainloop
|