Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Tkinter

Reply
Thread Tools

Tkinter

 
 
Luke
Guest
Posts: n/a
 
      02-04-2009
Hello, I'm an inexperienced programmer and I'm trying to make a
Tkinter window and have so far been unsuccessful in being able to
delete widgets from the main window and then add new ones back into
the window without closing the main window.

The coding looks similar to this:

from Tkinter import *
def MainWin():
main=Tk()
main.geometry('640x480')
back_ground=Frame(main,width=640,height=480,bg='bl ack')
back_ground.pack_propagate(0)
back_ground.pack(side=TOP,anchor=N)
frame1=Frame(back_ground,width=213,height=480,bg=' light gray')
frame1.pack_propagate(0)
frame1.pack(side=TOP,anchor=N)
close_frame1=Button(frame1,text='close',bg='light gray',
command=frame1.destroy)
close_frame1.pack_propagate(0)
close_frame1.pack(side=TOP, anchor=N,pady=25)
if frame1.destroy==True:
frame1=Frame(back_ground,width=213,height=480,bg=' white')
frame1.pack_propagate(0)
frame1.pack(side=TOP,anchor=N)
main.mainloop()
MainWin()

It may just be bad coding but either way I could use some help.

Thanks
 
Reply With Quote
 
 
 
 
Luke
Guest
Posts: n/a
 
      02-05-2009
Thanks, Its working smoothly now
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: What is the differences between tkinter in windows and Tkinter inthe other platform? Hidekazu IWAKI Python 0 12-15-2009 05:58 AM
What is the differences between tkinter in windows and Tkinter in theother platform? Hidekazu IWAKI Python 1 12-14-2009 03:44 PM
from Tkinter import *,win = Tk() "from Tkinter import *" Pierre Dagenais Python 0 08-03-2008 10:33 PM
Re: [Tkinter-discuss] Please help -- Tkinter Scale widget withDoubleVar is acting weird Jeff Epler Python 0 08-23-2004 02:31 PM
Re: [Tkinter-discuss] Please help -- Tkinter Scale widget withDoubleVar is acting weird Jeff Epler Python 0 08-20-2004 12:07 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57