Posted to tcl by Stu at Sat May 20 16:55:33 GMT 2023view raw

  1. B B;
  2. .B0 -text \u2191\u2193\u2190\u2192 -underline 0 -command { apply {{} { \
  3. set u [/B0/ cget -underline] \; \
  4. if {[incr u] > 3} {set u 0} \; \
  5. /B0/ configure -underline $u \; \
  6. /B1/ configure -text [string index [/B0/ cget -text] [/B0/ cget -underline]] \
  7. }}}
  8. .B1 -text \u2191 -command {puts [/B0/ cget -underline]}