Tkinter equiv for setPalette

Russell E. Owen rowen at
Mon Feb 11 20:42:16 CET 2008

In article <47aeda20$0$2988$ba620e4c at>,
 Helmut Jarausch <jarausch at> wrote:

> Hi,
> I am to convert an old Perl-Tk script to Python.
> It starts by
> my $MW= new MainWindow;
> $MW->setPalette(background => 'AntiqueWhite1', foreground => 'blue');
> Is there an equivalent for Tkinter? How can I set default colors for
> background and foreground for the whole application (root window and its
> children)

Tkinter widgets have a tk_setPalette method so you can do this:

root = Tkinter.Tk()
root.tk_setPalette(background = 'AntiqueWhite1', foreground = 'blue')

-- Russell

More information about the Python-list mailing list