Updated 2009-10-05 14:21:43 by HJG

# 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]

Category Widget - Category GUI