-# Procedure search-fields {w buttondefs}
-# w search fields entry frame
-# buttondefs button definitions
-# Makes search entry fields and listbuttons.
-# Note: This procedure is not used elsewhere. The index-lines
-# procedure is used instead.
-proc search-fields {w buttondefs} {
- set i 0
- foreach buttondef $buttondefs {
- frame $w.$i -background white
-
- listbutton $w.$i.l 0 $buttondef
- entry $w.$i.e -width 32 -relief sunken
-
- pack $w.$i.l -side left
- pack $w.$i.e -side left -fill x -expand yes
- pack $w.$i -side top -fill x -padx 2 -pady 2
-
- bind $w.$i.e <Left> [list left-cursor $w.$i.e]
- bind $w.$i.e <Right> [list right-cursor $w.$i.e]
-
- incr i
- }
- set j 0
- incr i -1
- while {$j < $i} {
- set k [expr $j+1]
- bind $w.$j.e <Tab> "focus $w.$k.e \n
- $w.$k configure -background red \n
- $w.$j configure -background white"
- set j $k
- }
- bind $w.$i.e <Tab> "focus $w.0.e \n
- $w.0 configure -background red \n
- $w.$i configure -background white"
- focus $w.0.e
- $w.0 configure -background red
-}
-