code: def focusin(event):
          
          w = event.widget.spinbox
          w.old_value = w.get()
          bc = w.style.lookup("TEntry", "bordercolor", ("focus",))
          dc = w.style.lookup("TEntry", "darkcolor", ("focus",))
          lc = w.style.lookup("TEntry", "lightcolor", ("focus",))
          w.style.configure("%s.spinbox.TFrame" % event.widget, bordercolor=bc,
                            darkcolor=dc, lightcolor=lc)
docs: Change style on focus in events.