summaryrefslogtreecommitdiff
path: root/jni/ruby/ext/tk/sample/tkhello.rb
blob: 597c1f6242a13afd100a0ae877657374a6b17706 (plain)
1
2
3
4
5
6
7
8
9
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