Tkinter and default options

richard_chamberlain richard_chamberlain at ntlworld.com
Sun Jul 2 13:19:23 EDT 2000


Hi Thomas,

You can use an option database. If you create a file called optionDB with
for example the following kind of entries:

*font:                                Times New Roman
*Button*foreground            blue
*foreground                        black

You can then apply these via

root.option_readfile('optionDB')

Richard

<thomas_s at ebox.tninet.se> wrote in message
news:8jnbhm$bb6$1 at cubacola.tninet.se...
> Hello,
>
> I'm using Tkinter for the GUI parts of a little game I'm working on. What
is
> the best way of setting default options of the widgets?  For instance I
> want all widgets to have fg='green' and bg='black'. Is there a standard
> way of doing this? If not, I was thinking of maybe writing a widget
factory
> that creates and configures them for me.
>
> Thank,
> Thomas
>





More information about the Python-list mailing list