#!/usr/local/bin/wish4.2 proc print_height {height} { puts $height } scale .scale -orient horizontal -length 280 -from 0 -to 250 \ -command "print_height" -tickinterval 50 pack .scale
#!/usr/local/bin/ruby require "tk" def print_height height = $scale.get() print height, "\n" end $scale = TkScale.new { orient 'horizontal' length 280 from 0 to 250 command "print_height" tickinterval 50 pack } Tk.mainloop