Re: [Tutor] about tkinter

2006-09-05 Thread Alan Gauld
> you can use a "hidden" root window, like this: > >root = Tk() >root.withdraw()# hide the root window Aha! I thought there should be a better way than defining the size to be 1 pixel! :-) Thanks for that tip Michael, Alan Gauld Author of the Learn to Program web site http://www.freene

Re: [Tutor] about tkinter

2006-09-05 Thread Alan Gauld
>> Here is a very short example of creating two windows: >> >> >>> from Tkinter import * >> >>> win = Tk() >> >>> win1 = Toplevel(win) >> >>> f = Frame(win) >> >>> f.pack() >> >>> g = Frame(win1) >> >>> g.pack() >> >>> Label(f,text="Main").pack() >> >>> Label(g,text="Sub").pack() >> >>> win.mainloo

Re: [Tutor] about tkinter

2006-09-05 Thread Michael Lange
On Tue, 5 Sep 2006 01:46:02 -0700 "linda.s" <[EMAIL PROTECTED]> wrote: > > > If I close the 'main' window, 'sub' window will be closed too. How can > I close just one window? > Linda Hi Linda, you can use a "hidden" root window, like this: root = Tk() root.withdraw()# hide the root wind

Re: [Tutor] about tkinter

2006-09-05 Thread linda.s
On 9/5/06, Alan Gauld <[EMAIL PROTECTED]> wrote: > Hi Linda, > > >> Can you be clearer about what exactly you want to do? > >> > > I want to open two windows with one having the blue triangle and the > > other one having the red triangle (the code is attached). I can not > > figure out how to use t

Re: [Tutor] about tkinter

2006-09-05 Thread Alan Gauld
Hi Linda, >> Can you be clearer about what exactly you want to do? >> > I want to open two windows with one having the blue triangle and the > other one having the red triangle (the code is attached). I can not > figure out how to use toplevel. Looking at your code it would help the readasbility

Re: [Tutor] about tkinter

2006-09-05 Thread linda.s
On 8/9/06, Alan Gauld <[EMAIL PROTECTED]> wrote: Linda, > Is that possible to open two Tkinter from one python shell? Tkinter is a python module. You can't really open a Tkinter, you can only import the module. What you can do is write a Tkinter application with multiple windows. You can have

Re: [Tutor] about tkinter

2006-08-09 Thread Alan Gauld
Linda, > Is that possible to open two Tkinter from one python shell? Tkinter is a python module. You can't really open a Tkinter, you can only import the module. What you can do is write a Tkinter application with multiple windows. You can have as many Tkinter applications running as you like

Re: [Tutor] about tkinter

2006-08-09 Thread Danny Yoo
On Wed, 9 Aug 2006, linda.s wrote: > Is that possible to open two Tkinter from one python shell? It is possible to open more Tkinter "toplevel" windows. Is this what you are asking for? See: http://www.pythonware.com/library/tkinter/introduction/toplevel.htm If we build a new Topleve

[Tutor] about tkinter

2006-08-09 Thread linda.s
Is that possible to open two Tkinter from one python shell? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor