Version 0 of iPAQ as signal lamp

Updated 2003-03-12 11:37:39

if 0 {Richard Suchenwirth 2003-03-12 - Here's a cute little application for the iPAQ: a signal light. Dirt simple: fill the display in a single color, controlled by the "cursor keys" (navigation button up/down/left/right). But when background lighting is on, you can use this for signalling in the dark - or, with the default white, as a mild pocket lamp... or to test whether the display's pixels are all working... Yellow looks pretty beige, though. A cheap thrill at less than 900 bytes, this documentation included ;-) }

 proc sigbind {w color} {
    if {[$w cget -background] != "white"} {set color white}
    $w config -background $color
 }
 pack [canvas .c -background white -height 320]
 wm geometry . +0+0
 bind . <Up>    {sigbind .c red}
 bind . <Down>  {sigbind .c green}
 bind . <Left>  {sigbind .c yellow}
 bind . <Right> {sigbind .c blue}

if 0 {


Arts and crafts of Tcl-Tk programming }