Aug 10, 2002 #1 Cadao Programmer Joined Jul 22, 2005 Messages 1 Location BR Is there a way to hide a control like a button?
Aug 10, 2002 #2 ulis Programmer Joined Oct 12, 2001 Messages 429 Location FR Yes, you can use the option forget with the geometry manager (pack, place or grid) you used to show your widget. Code: button .b -text test pack .b after 1000 pack forget .b You will watch the button disappear after 1 s. To show the widget again, re-use the same geometry manager you used. In this case Code: pack retains all the configuration so you only need: Code: pack .b to get the button as it was. On my win2k box with Tk 8.3 this is not the case with Code: place (you need to give again the configuration). Good luck ulis Upvote 0 Downvote
Yes, you can use the option forget with the geometry manager (pack, place or grid) you used to show your widget. Code: button .b -text test pack .b after 1000 pack forget .b You will watch the button disappear after 1 s. To show the widget again, re-use the same geometry manager you used. In this case Code: pack retains all the configuration so you only need: Code: pack .b to get the button as it was. On my win2k box with Tk 8.3 this is not the case with Code: place (you need to give again the configuration). Good luck ulis