[GRASS-dev] Re: how to check for system in TclTk

Paul Kelly paul-grass at stjohnspoint.co.uk
Mon May 7 08:13:27 EDT 2007

On Sun, 6 May 2007, Michael Barton wrote:

> I've fixed this in the CVS, so that setting the default font should work
> with Windows now.

OK thanks I made a few more changes and now it is working quite well. Most 
notably that the
global env, tcl_platform
syntax didn't work (env(GISBASE) was an unknown variable) and I had to 
change it to:
global env
global tcl_platform
(which is what the Tcl documentation suggests anyway; ISTR coming across 
this before but it seemed to be OK then. Not too sure.)

The other noteworthy change was using the Native Tk file browser widget 
::tk::dialog::file:: instead of the native Windows one that tk_getOpenFile 
uses. The native Windows one was very slow and clunky and most 
importantly didn't work for selecting fonts from the Windows fonts 
directory. Clicking on a file didn't put it into the selection box and 
double-clicking opened a Window displaying the font's capabilities. The 
native Tk widget admittedly has a distinct early-90s look to it but it is 
fast and (most importantly) works.


More information about the grass-dev mailing list