summaryrefslogtreecommitdiff
path: root/ext/tk/sample/tkhello.rb
blob: 02de5ff381c6445a5535dd61341b60a867989dad (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: false
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