#!/usr/bin/ruby require 'tk' f = TkFrame.new.pack lx = TkLabel.new(f, 'relief'=>'ridge', 'width'=>6).pack('side'=>'left') ly = TkLabel.new(f, 'relief'=>'ridge', 'width'=>6).pack('side'=>'left') c = TkCanvas.new.pack c.bind( 'Motion', proc{|x, y| t = Time.now lx.text( x.to_s ) ly.text( y.to_s ) print x.to_s , " ", y.to_s, " ", t.min, " " puts t.sec }, "%x %y" ) Tk.mainloop