diff options
author | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-01 07:48:23 +0000 |
---|---|---|
committer | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-01 07:48:23 +0000 |
commit | 83c93751fe1c5a5bcb6d8bf88d6900eaae8173dc (patch) | |
tree | b79d198709497f123f1a79a3a52bebac603d7753 /sample/tkdialog.rb | |
parent | 62e648e148b3cb9f96dcce808c55c02b7ccb4486 (diff) |
This commit was manufactured by cvs2svn to create tag
'v1_3_1_990201'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_3_1_990201@387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/tkdialog.rb')
-rw-r--r-- | sample/tkdialog.rb | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/sample/tkdialog.rb b/sample/tkdialog.rb deleted file mode 100644 index e83e16d0a8..0000000000 --- a/sample/tkdialog.rb +++ /dev/null @@ -1,62 +0,0 @@ -#! /usr/local/bin/ruby -require "tk" - -root = TkFrame.new -top = TkFrame.new(root) { - relief 'raised' - border 1 -} -msg = TkMessage.new(top) { - text "File main.c hasn't been saved to disk since \ -it was last modified. What should I do?" - justify 'center' - aspect 200 - font '-Adobe-helvetica-medium-r-normal--*-240*' - pack('padx'=>5, 'pady'=>5, 'expand'=>'yes') -} -top.pack('fill'=>'both') -root.pack - -bot = TkFrame.new(root) { - relief 'raised' - border 1 -} - -TkFrame.new(bot) { |left| - relief 'sunken' - border 1 - pack('side'=>'left', 'expand'=>'yes', 'padx'=>10, 'pady'=> 10) - TkButton.new(left) { - text "Save File" - command "quit 'save'" - pack('expand'=>'yes','padx'=>6,'pady'=> 6) - top.bind "Enter", proc{state 'active'} - msg.bind "Enter", proc{state 'active'} - bot.bind "Enter", proc{state 'active'} - top.bind "Leave", proc{state 'normal'} - msg.bind "Leave", proc{state 'normal'} - bot.bind "Leave", proc{state 'normal'} - Tk.root.bind "ButtonRelease-1", proc{quit 'save'} - Tk.root.bind "Return", proc{quit 'save'} - } -} -TkButton.new(bot) { - text "Quit Anyway" - command "quit 'quit'" - pack('side'=>'left', 'expand'=>'yes', 'padx'=>10) -} -TkButton.new(bot) { - text "Return To Editor" - command "quit 'return'" - pack('side'=>'left', 'expand'=>'yes', 'padx'=>10) -} -bot.pack -root.pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes') - -def quit(button) - print "aaa\n" - print "You pressed the \"#{button}\" button; bye-bye!\n" - exit -end - -Tk.mainloop |