List Info

Thread: Look of the Tk apps in Debian Linux




Look of the Tk apps in Debian Linux
user name
2006-02-15 15:33:41
Hi,
I'm on Debian Linux and I'd like to know where can I
centrally change the font and maybe the whole look if it's
possible of Tk applications. I run some applications that
uses Tk (IDLE - The Python IDE for example) and they all
looks the same, so I think that this should change centrally
somewhere.

Please give me some advices.
Thanks in advance,
Jakub Sporek


________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux
Mail Server.
http://www.nod32.com
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discusspython.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Look of the Tk apps in Debian Linux
user name
2006-02-16 01:08:07
On Wed, Feb 15, 2006 at 04:33:41PM +0100, Jakub Sporek
wrote:
			.
			.
			.
> I'm on Debian Linux and I'd like to know where can I
> centrally change the font and maybe the whole look if
it's
> possible of Tk applications. I run some applications
that
> uses Tk (IDLE - The Python IDE for example) and they
all
> looks the same, so I think that this should change
centrally
> somewhere.
			.
			.
			.
There are a couple of aspects to this:
A.  Who can report on when Tkinter as a whole or IDLE
    in particular will be Tile-ified?
B.  You want to learn about "the option
database" <URL:
    ht
tp://effbot.org/zone/tkinter-option-database.htm >.
    For even more immediate encouragement, try
      import Tkinter
      root = Tkinter.Tk()
      root.option_add('*font', ('verdana', 30,
'bold'))
      Tkinter.Label(text = "This is some
text.").pack()
C.  B. presents a per-application approach.  As Tkinter
    is a well-behaved X11 toolkit, you can also read up
    on the X11 option database (start with `man xrdb`).

Jeff and Fredrik are likely to expand these remarks.  The
subject
deserves its own Wiki page ...
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discusspython.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Look of the Tk apps in Debian Linux
user name
2006-02-16 01:25:38
You can use the X resource database to control the default
appearance of
Tk widgets.

For example, try the following shell script before running a
Tk or
Tkinter app:
    for class in Label Entry Listbox Button Checkbutton
Radiobutton Menu
    do
      echo "*$class.font: helvetica 12"
    done | xrdb -merge
It will choose a nicer (non-bold) font for most widgets. 
These settings
will persist until logout, or until modified by a subsequent
'xrdb'
invocation.

You can get the rest of what I know from reading the
'option' manpage,
which is a Tk command that adds resources to the list for
just one
instance of Tk.  I believe the resource syntax is able to
specify
application names, widget paths, and widget classes, though
I don't know
all the particulars.  I generally use the
*Class.databaseName format,
and nothing else.

Jeff
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discusspython.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Look of the Tk apps in Debian Linux
user name
2006-02-16 02:15:57
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cameron Laird wrote:
> On Wed, Feb 15, 2006 at 04:33:41PM +0100, Jakub Sporek
wrote:
> 			.
> 			.
> 			.
>> I'm on Debian Linux and I'd like to know where
can I
>> centrally change the font and maybe the whole look
if it's
>> possible of Tk applications. I run some
applications that
>> uses Tk (IDLE - The Python IDE for example) and
they all
>> looks the same, so I think that this should change
centrally
>> somewhere.
> 			.
> 			.
> 			.
> There are a couple of aspects to this:
> A.  Who can report on when Tkinter as a whole or IDLE
>     in particular will be Tile-ified?
> B.  You want to learn about "the option
database" <URL:
>     ht
tp://effbot.org/zone/tkinter-option-database.htm >.
>     For even more immediate encouragement, try
>       import Tkinter
>       root = Tkinter.Tk()
>       root.option_add('*font', ('verdana', 30,
'bold'))
>       Tkinter.Label(text = "This is some
text.").pack()
> C.  B. presents a per-application approach.  As Tkinter
>     is a well-behaved X11 toolkit, you can also read up
>     on the X11 option database (start with `man xrdb`).
> 
> Jeff and Fredrik are likely to expand these remarks. 
The subject
> deserves its own Wiki page ...
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discusspython.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
> 
> 
There's a Tkinter/Tile wrapper here:

h
ttp://mfranklin.is-a-geek.org/docs/Tile/index.html

I'm undertaking development of a Python application that
will  make use
of this module, and will contribute documentation on using
Tkinter/Tile
(Tileinter?) at the appropriate time.

I can't sepak for IDLE.

Kevin


- --
Kevin Walzer
iReveal: File Search Tool
http://www.wordtech-
software.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFD8+BcJmdQs+6YVcoRAjh2AJ0aHumLj4qHx9G0iRG40PLfJWMBvgCf
dSJ2
wPLwUp9ITbm8f87ifUF5cSc=
=OSzu
-----END PGP SIGNATURE-----
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discusspython.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Look of the Tk apps in Debian Linux
user name
2006-02-16 20:46:29
Ok, thanks a lot...
that script works fine. Is there a possibility to change the
background color of the menus etc. the same way as the
font-change?

On 16.02.2006 (02:25), jeplerunpythonic.net wrote:
> You can use the X resource database to control the
default appearance of
> Tk widgets.
> 
> For example, try the following shell script before
running a Tk or
> Tkinter app:
>     for class in Label Entry Listbox Button Checkbutton
Radiobutton Menu
>     do
>       echo "*$class.font: helvetica 12"
>     done | xrdb -merge
> It will choose a nicer (non-bold) font for most
widgets.  These settings
> will persist until logout, or until modified by a
subsequent 'xrdb'
> invocation.
> 
> You can get the rest of what I know from reading the
'option' manpage,
> which is a Tk command that adds resources to the list
for just one
> instance of Tk.  I believe the resource syntax is able
to specify
> application names, widget paths, and widget classes,
though I don't know
> all the particulars.  I generally use the
*Class.databaseName format,
> and nothing else.
> 
> Jeff


________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux
Mail Server.
http://www.nod32.com
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discusspython.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
Look of the Tk apps in Debian Linux
user name
2006-02-17 14:33:25
On Thu, Feb 16, 2006 at 09:46:29PM +0100, Jakub Sporek
wrote:
			.
			.
			.
> Ok, thanks a lot...
> that script works fine. Is there a possibility to
change the
> background color of the menus etc. the same way as the
> font-change?
			.
			.
			.
Does
  demonstr% python
  Python 2.3.5 (#1, Mar 20 2005, 20:38:20) 
  [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on
darwin
  Type "help", "copyright",
"credits" or "license" for more
information.
  >>> import Tkinter
  >>> m = Tkinter.Menu()
  >>> m.configure()
  {'bd': ('bd', '-borderwidth'),
'disabledforeground':
  ('disabledforeground', 'disabledForeground',
'DisabledForeground',
  <color object at 0x000eec00>, <color object at
0x000eec00>),
  'postcommand': ('postcommand', 'postCommand',
'Command', '', ''),
  'bg': ('bg', '-background'), 'type': ('type',
'type', 'Type', <index
  object at 0x000eed68>, <index object at
0x000eed68>), 'foreground':
  ('foreground', 'foreground', 'Foreground', <color
object at
  0x000eebd0>, <color object at 0x000eebd0>),
'title': ('title',
  'title', 'Title', '', ''), 'relief':
('relief', 'relief', 'Relief',
  <index object at 0x000eecd8>, <index object at
0x000eecd8>),
  'selectcolor': ('selectcolor', 'selectColor',
'Background', <color
  object at 0x000eecf0>, <color object at
0x000eecf0>), 'cursor':
  ('cursor', 'cursor', 'Cursor', <cursor object at
0x000eec90>, <cursor
  object at 0x000eec90>), 'takefocus': ('takefocus',
'takeFocus',
  'TakeFocus', '0', '0'), 'activeborderwidth':
('activeborderwidth',
  'activeBorderWidth', 'BorderWidth', <pixel object
at 0x000eebb8>,
  <pixel object at 0x000eebb8>), 'background':
('background',
  'background', 'Background', <border object at
0x000eec78>, <border
  object at 0x000eec78>), ...
address your question meaningfully?  I elaborate:  just as
"font"
is a configuration variable for a Label, so is
"background" for
"menu", as Python is willing to inform you
during an interactive
session, if you know how to ask it.  Does that make sense?
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discusspython.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )