Code Comments
Programming Forum and web based access to our favorite programming groups.iam under debian testing and i try to have nice police with tk wigets. the default police is very ugly and sometime it's impossible to read inside the tk wigets someone kown where do i can change this default police ? thanks God
Post Follow-up to this messagenot "police" but "font" and sorry for my english ;)
Post Follow-up to this messageGod wrote:
> not "police" but "font" and sorry for my english ;)
You should be able to override the default font when starting
your script.
%> tkScript.pl -font "Arial 14"
This should now set all fonts to Arial 14"
If you want to do this without providing the command line
argument you can try. Some of the option* methods.
I have use a resource file that my gui reads before starting
up to change all background colors and fonts.
$mw->optionReadfile("path to resource file")
The file contains the following entries:
*background: wheat2
*foreground: black
*selectColor: maroon
*selectBackground: white
*selectForeground: red
*troughColor: gray60
*disabledBackground: gray85
*disabledForeground: gray60
*activeBackground: #f5edb3
*activeForeground: blue
*Text*foreground: black
*Entry*foreground: black
*font:
-*-lucidatypewriter-bold-r-normal-*-13-*-*-*-*-*-*-*
*Entry*font: -*-courier-medium-r-normal-*-12-*-*-*-*-*-*-*
So you see I have modified all the default behaviors with my
own customization. I just have the script read this file when
it starts up. After that all widgets honor these settings.
So you can try this approach.
See User Customization (chapter 16) in Mastering Perl Tk.
Hope this helps,
Mike
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.