fuston05
Jr. Member
Karma: 0
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()
|