summaryrefslogtreecommitdiff
path: root/ruby_1_8_5/ext/tk/sample/tkhello.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ruby_1_8_5/ext/tk/sample/tkhello.rb')
-rw-r--r--ruby_1_8_5/ext/tk/sample/tkhello.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/ruby_1_8_5/ext/tk/sample/tkhello.rb b/ruby_1_8_5/ext/tk/sample/tkhello.rb
new file mode 100644
index 0000000000..3b505f4983
--- /dev/null
+++ b/ruby_1_8_5/ext/tk/sample/tkhello.rb
@@ -0,0 +1,10 @@
+require "tk"
+
+TkButton.new(nil,
+ :text => 'hello',
+ :command => proc{print "hello\n"}).pack(:fill=>'x')
+TkButton.new(nil,
+ :text => 'quit',
+ :command => proc{exit}).pack(:fill=>'x')
+
+Tk.mainloop