Applet

[Define what an applet is, where it is used, etc.]

link to the Wikipedia definition: http://en.wikipedia.org/wiki/Applet


  package require Tk
  proc selrow { W } {
    foreach w [winfo children [winfo parent $W]] {
      if {[lindex [grid info $W] 5] == [lindex [grid info $w] 5]} {
        $w configure -bg red ; # replace by your code here ...
      } else {
        $w configure -bg white ; # ... or here
      }
    }
  }

  for {set r 0} {$r < 10} {incr r} {
    for {set c 0} {$c < 10} {incr c} {
      grid [label .${r}$c -text "row $r\ncol $c" -bg white -relief ridge] -row $r -column $c
      bind .${r}$c <1> {+ selrow %W}
    }
  }