# omake3.rb require 'tk' v1 = TkVariable.new t1 = TkText.new t2 = TkEntry.new(nil,'textvariable'=>v1) t3 = TkButton.new(nil, 'text'=>'enter', 'command'=>proc{ t1.insert('end',v1.value+"\n") t2.delete(0,'end') }) t1.pack('side'=>'top') t2.pack('side'=>'left') t3.pack('side'=>'left') Tk.mainloop