# GPS
# When selected, an item in the listbox flashes a few times.
proc flash.listbox.selection {listWin i} { set oldFg [$listWin cget -selectforeground] set oldBg [$listWin cget -selectbackground] $listWin config -selectforeground $oldBg $listWin config -selectbackground $oldFg incr i if {$i > 3} { return } after 60 [list flash.listbox.selection $listWin $i] }
# Usage:
pack [listbox .l] .l insert end Tcl and Tk are fun to play with bind .l <<ListboxSelect>> [list flash.listbox.selection .l 0]