[Tkinter-discuss] Look of the Tk apps in Debian Linux

Cameron Laird Cameron at Phaseit.net
Fri Feb 17 15:33:25 CET 2006

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?
  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?

More information about the Tkinter-discuss mailing list