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