tkinter, option_add, entry field trouble

Bob Greschke bob at
Sun Jun 5 21:32:31 CEST 2005

Yahoo!  That was it.  When is Grayson coming out with a new version of 
"Python and Tkinter Programming"?  Mine is getting pretty full of pen & ink 
changes. :)

Nice tip, too!


<jepler at> wrote in message 
news:mailman.12.1117998826.10512.python-list at

I think you have to spell it
 Root.option_add("*Entry*highlightThickness", "2")
 Root.option_add("*Entry*highlightColor", "green")

When you're not sure of the capitalization, do something like this
 >>> e.configure('highlightcolor')
 ('highlightcolor', 'highlightColor', 'HighlightColor',
  'SystemWindowFrame', 'green')
When you use 'configure' this way, the *second* string has the correct
capitalization for use in option_add.  The fourth is the system default 
taking into account the option database, and the last is the current value.


More information about the Python-list mailing list