Code Point
September 10, 2010, 06:05:09 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Geshi Sintax Hilighting Mod Installed. Tens of languages available.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: is it possible to change color of root widget box??  (Read 2128 times)
fuston05
Jr. Member
*

Karma: 0
Offline Offline

Posts: 14


« on: February 08, 2008, 10:41:29 PM »

is there a way to change the color of my root box??

#-----------------------------------------------------------------------------

#!/usr/bin/python

from Tkinter import *

def get():
    global pic
    global tem
   
   
   
    imp = ent.get()
    if imp == 'clear':
        can.delete(tem)
        ent.delete(0,END)
    else:
        pic = PhotoImage(file = imp)
        tem = can.create_image(275,200,image = pic)
        ent.delete(0,END)


   

   

root = Tk()
root.geometry('600x600+270+50')


lab = Label(root, text = 'Enter the name of the picture:', font = ("helvatica", 20))
ent = Entry(root, bg = 'red', font = ('helvatica', 20))
button = Button(root, text = 'enter', width = 10, height = 2, command = get)
can = Canvas(root, width = '550', height = '550', bg = 'black')





ent.focus()
lab.pack(pady = 10)
ent.pack(pady = 10)
button.pack(padx = 10)
can.pack(pady = 10)



root.mainloop()

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!