#!/usr/koeki/bin/ruby -Ke require 'tk' TkCanvas.new { width(400) height(300) bind('1', proc {|x, y, a, b| printf("ÀäÂÐ:(%d,%d)\t", x, y) printf("ÁêÂÐ:(%d,%d)\n", a, b) }, "%X %Y %x %y") }.pack TkButton.new() { text("quit") command(proc{exit(0)}) }.pack("side"=>"right") Tk.mainloop