tkinter, option_add, entry field trouble

Bob Greschke bob at passcal.nmt.edu
Sun Jun 5 15:32:31 EDT 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!

Thanks!

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

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
interactively:
 >>> 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 
before
taking into account the option database, and the last is the current value.

Jeff





More information about the Python-list mailing list