Tkinter equiv for setPalette
Russell E. Owen
rowen at cesmail.net
Mon Feb 11 14:42:16 EST 2008
In article <47aeda20$0$2988$ba620e4c at news.skynet.be>,
Helmut Jarausch <jarausch at skynet.be> 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