summaryrefslogtreecommitdiff
path: root/ext/tk/sample/tkhello.rb
blob: 3b505f4983e452395341aa4e96b4f9349f29c57a (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