Faqts : Business : Programming : Shopping For You : Python : Tkinter

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 8 people (75%) answered Yes
Recently 3 of 5 people (60%) answered Yes

Entry

In tkinter, how do you change a widget's parent?

Dec 3rd, 2009 01:41
tie nrie, jsieoa gide, Scott Mandarich, unknown unknown, keith murphy, Richard Chamberlain


Tricky one this.

FYI you can get widget options via either config() or keys(). So for
instance if you did:

entry=Entry(root,width=20)

then

print entry.config().keys()

or entry.keys()

would show you all the available options for that widget. You should 
use
a combination of both because they both show some things and not 
others.
There isn't a parent option, nor a method (not one that I know of at
least). 

The only way I know of doing it would be to use pack_forget() (or for
the grid-master grid_forget() or grid_remove()) and then assign the
variable to another widget in another frame.

If it's a complicated widget then wrap the whole thing a function with
parent as an argument so all you need to do is call the function to
recreate it.




-----------------------------------------------------------------------

http://helseernaeringomsorg.blogspot.com/
http://asistentamedicalanutritie.blogspot.com/
http://nutrionblo.blogspot.com/
http://zdravotnejstarostlivostivyziva.blogspot.com/
http://atencionnutricionalsalud.blogspot.com/
http://healthnutritionsjukvard.blogspot.com/



-----------------------------------------------------------------------





http://nyeargaver.blogogi.com/
http://novyrokdarky.blogogi.com/
http://novagodinapokloni.blogogi.com/
http://nuyrbg.blogogi.com/
http://julklapparide.blogogi.com/
http://regalosdenavidad.blogogi.com/
http://christmasru.blogogi.com/







http://65.182.191.43/d/pump.html