[Tkinter-discuss] Python2.5.1+Tkinter+Tile0.8.2

Michael Lange klappnase at web.de
Mon Jan 12 20:36:00 CET 2009

On Mon, 12 Jan 2009 15:40:35 +0000
Cameron Laird <Cameron at phaseit.net> wrote:

> On Fri, Jan 02, 2009 at 04:17:29PM +0000, Nawal <Galileon> Husnoo wrote:
> 			.
> 			.
> 			.
> > I'm just starting out in Python Tkinter programming, and I tried to use the
> > Tile module to improve the looks of the Tk program I am writing.
> > 
> > When I run the script written in <code></code> below, it works fine, using
> > the Tile module to make the Tk look ok. However, when I try to use
> > tkMessageBox.showwarning() as in the script, it fails with the error below.
> > I've tried to cat | grep for "background" in the files mentionned in the
> > error, but nothing turns up. I can't find where the "-background" switch is
> > getting stuck in. I know the "background" switch doesn't work with Tile, but
> > I can't find it to remove it. Any ideas please?
> Can you upgrade to 8.5 of Tk?  <URL:
> http://tkinter.unpythonic.net/wiki/tk85_and_python >
> might help you.

I think the problematic part is this:

  root.tk.call('package', 'require', 'tile')
  root.tk.call('namespace', 'import', '-force', 'ttk::*')
  root.tk.call('ttk::setTheme', 'clam')

If I understand this correctly it will override the names of the core tk widgets with their themed
counterparts. So the file using the (no longer existing) "background" option is probably msgbox.tcl .
If you want to use tile you are certainly better off using Guilherme Polo's ttk module.


More information about the Tkinter-discuss mailing list