473,394 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Change UI default background color

440 256MB
Hi,

I would like to change the UI default background color ( Grey) to some other color.What is the option in python to play with that?

Thanks in advance
PSB
Mar 10 '07 #1
3 2689
bartonc
6,596 Expert 4TB
Expand|Select|Wrap|Line Numbers
  1.  
  2. def _main():
  3.     root = Tk(className='BCDB')
  4.     root.title('The Body of Christ DataBase')
  5.     root.option_add("*Frame*background", "powderblue", 20)
  6.     root.option_add("*Entry*background", "white", 20)
  7.     root.option_add("*Button*background", "SystemButtonFace", 20)
  8.     root.option_add("*Entry*font", "Courier 10", 20)
  9.     root.option_add("*Menu*font", "Tahoma 8", 20)
  10.     root.option_add("*Menu*background", "white", 20)
  11.     root.option_add("*Text*background", "white", 20)
  12.     root.option_add("*Text*font", "Courier 10", 20)
  13.  
  14.     addressbook = AddressBook(root)
  15.     root.mainloop()
Mar 10 '07 #2
bartonc
6,596 Expert 4TB
Expand|Select|Wrap|Line Numbers
  1.  
  2. def _main():
  3.     root = Tk(className='BCDB')
  4.     root.title('The Body of Christ DataBase')
  5.     root.option_add("*Frame*background", "powderblue", 20)
  6.     root.option_add("*Entry*background", "white", 20)
  7.     root.option_add("*Button*background", "SystemButtonFace", 20)
  8.     root.option_add("*Entry*font", "Courier 10", 20)
  9.     root.option_add("*Menu*font", "Tahoma 8", 20)
  10.     root.option_add("*Menu*background", "white", 20)
  11.     root.option_add("*Text*background", "white", 20)
  12.     root.option_add("*Text*font", "Courier 10", 20)
  13.  
  14.     addressbook = AddressBook(root)
  15.     root.mainloop()
If you change the background of Frames, you'll need to set it to white for other types of objects.
Mar 10 '07 #3
bartonc
6,596 Expert 4TB
Expand|Select|Wrap|Line Numbers
  1.  
  2. def _main():
  3.     root = Tk(className='BCDB')
  4.     root.title('The Body of Christ DataBase')
  5.     root.option_add("*Frame*background", "powderblue", 20)
  6.     root.option_add("*Entry*background", "white", 20)
  7.     root.option_add("*Button*background", "SystemButtonFace", 20)
  8.     root.option_add("*Entry*font", "Courier 10", 20)
  9.     root.option_add("*Menu*font", "Tahoma 8", 20)
  10.     root.option_add("*Menu*background", "white", 20)
  11.     root.option_add("*Text*background", "white", 20)
  12.     root.option_add("*Text*font", "Courier 10", 20)
  13.  
  14.     addressbook = AddressBook(root)
  15.     root.mainloop()
The syntax for option_add() is the same as configuration files, so these settings can be stored outside of your program (and even made user settable).
Mar 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Jan Tuxen | last post by:
Jakob Nielsen in his most recent Alertbox (http://www.useit.com/alertbox/20040503.html) tells web authors to change the color of visited links. I agree to his purpose: Help users understand...
2
by: RWD | last post by:
I am trying to figure out how to change the target frame in my hyperlink on a DHTML menu. The menu is in one frame and the target frame is called "main" The code is below: Thanks in advance...
18
by: Denny Schierz | last post by:
hi, i want to change my link colors in the p class="suchen": That is my html: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//DE"...
3
by: Mike Barnard | last post by:
Hi all, newbie here. Odd sounding subject but I can't describe it any better. I'm trying to teach myself a little about CSS. In a test site (not published) I am trying to use CSS to make...
4
by: RC | last post by:
By default the radio button is a hollow circle for unchecked and filled black circle for checked similar for the check box button is a hollow square for unchecked and check symbol for...
5
by: DavidB | last post by:
Greetings I don't know if this is possible, but this group should be able to tell me. I have a webpage with a changing message board (I understand the problems with having changing text, but...
0
by: Bharathi Kumar | last post by:
Hi, Iam working in a windows application using .Net framework 2.0, VS.NET 2005 and CR X. Scenario : When we create a report using CR by default they will be assigned some background colors.
3
by: Bundy | last post by:
Hi How do I change the background colour of an input box in a form as soon as the value is changed? Also the background should revert back to it's original colour if the user decides that they...
3
by: vj | last post by:
how to change images based on action. Even clicking changed images should do respective actions. and while displaying only one image at a time sholud get displayed. I am using three images for a...
4
by: html | last post by:
Hello all, I need to change the colour of my text. For the paragraph I do document.fgColor ="blue" ; but how do I do this for the select tags? ....and I prefer it to apply to all select tags...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.