button .pe.ok -text OK
pack .pe.grid .pe.ok -side left
+ bind .pe.ok <Key-Return> { .pe.ok invoke }
pack .d.mi .d.ctx -side top -anchor w
pack .d -fill x -padx 2 -pady 2
if {$col==$ncol} continue
.pe.grid.l$col selection clear 0 end
}
- pixmap_maybe_ok
+ if {[pixmap_maybe_ok]} {
+ focus .pe.ok
+ }
}
proc pixmap_maybe_ok {} {
global alloptions pixmap_selcol pixmap_selrow
if {$nsel==1} {
debug "MAYBE_OK YES col=$pixmap_selcol row=$pixmap_selrow."
.pe.ok configure -state normal -command pixmap_ok
+ return 1
} else {
.pe.ok configure -state disabled -command {}
+ return 0
}
}
proc pixmap_ok {} {
pixmap_maybe_ok
helptext {
- {{Indicate the meaning of this image, and click OK.}}
+ {{Indicate the meaning of this image; then click OK or hit Return.}}
}
}