[PYTHONMAC-SIG] Default Tk attributes?

Ivan Herman Ivan.Herman@cwi.nl
Mon, 30 Dec 1996 12:09:53 +0100


If I use Tk on a UNIX box, the X resource mechanism gives me a way to give
default values for various attributes like background colour, font, etc. Tk is
(more or less) prepared to follow the Xresource style in this respect.

Is there an analoguous mechanism on the Mac? To give a very specific example,
the font used by default in, e.g., Button or Label are far too big for my small 
PowerBook screen. The only way I could do it up to now is to set 
the font explicitely for each widget I create, but some more general
way would be much nicer. 

If there is no such mechanism in general (on Macs), the question is: should there be? This may be a general mechanism for Tkinter, regardless of the platform at hand. For example, I could say

	Button.config({'font' : 'Helvetica'})

i.e., use a class level function to set the defaults for each Button instance.
Such settings can then be put into a separate module to be loaded by a
program, thereby ensuring proper defaults for an environment.

Ivan



-----

Ivan Herman
Centre for Mathematics and Computer Sciences
Kruislaan 413
1098 SJ Amsterdam
tel: +31-20-592.41.63
fax: +31-20-592.41.99
Email: Ivan.Herman@cwi.nl
URL:   http://www.cwi.nl/~ivan/



=================
PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
=================