Re: [Tutor] Showing/hiding widgets in Tkinter

2011-04-07 Thread Alan Gauld
"The Green Tea Leaf" wrote I suddenly thought about one thing that I tested and my guess is that the window needs to refresh to show the label Thats a common issue with GUIs. You can force a refresh in Tk with the update() method. HTH, -- Alan Gauld Author of the Learn to Program web

Re: [Tutor] Showing/hiding widgets in Tkinter

2011-04-07 Thread The Green Tea Leaf
On Wed, Apr 6, 2011 at 15:35, Peter Otten <__pete...@web.de> wrote: >> Unfortunately, it doesn't work. I can see the label flashing when I >> press the button but it's not visible unless I press the button again. > > I don't understand that sentence. If you press the button the label should > disap

Re: [Tutor] Showing/hiding widgets in Tkinter

2011-04-06 Thread Peter Otten
The Green Tea Leaf wrote: > > which implies that tk does not store the placement information > > automatically. Assuming that Python's Tkinter behaves the same way you can > > write > > > > def toggle(): > >if mylabel.visible: > >mylabel.pi = mylabel.place_info() > >mylabel.pl

Re: [Tutor] Showing/hiding widgets in Tkinter

2011-04-06 Thread The Green Tea Leaf
>> According to the documentation I've read I should be able to use >> 'place()' after having used 'place_forget()' to show the label at the >> same place. > > Where did you read that? I only found > > """ > If the configuration of a window has been retrieved with place info, that > configuration c

Re: [Tutor] Showing/hiding widgets in Tkinter

2011-04-06 Thread Peter Otten
The Green Tea Leaf wrote: > Hi all, > > I'm trying to learn a bit about how to show/hide objects using the > available layout managers and have no problems using Pack or Grid but > when I try to use Place then I'm missing something > > My test code looks like this > > from Tkinter import * > >

[Tutor] Showing/hiding widgets in Tkinter

2011-04-06 Thread The Green Tea Leaf
Hi all, I'm trying to learn a bit about how to show/hide objects using the available layout managers and have no problems using Pack or Grid but when I try to use Place then I'm missing something My test code looks like this from Tkinter import * def toggle(): if mylabel.visible: my