TKinter is driving me crazy!

Cousin Stanley CousinStanley at hotmail.com
Wed Sep 3 00:08:47 CEST 2003


Daniel ...

    Applying the  whatEver.master.title()  method
    works out OK ...

    A slight modification of the last example script you posted ...

import sys
module_this = sys.argv[ 0 ]

from Tkinter import *
tk_Root = Tk()

button = Button( tk_Root , text = "Press me !" )
button.pack()

button.master.title( module_this )

tk_Root.mainloop()

# ----------------------------------------------

And a slight modification of Jp's script
also works OK to add the desired title ...

if __name__  ==  '__main__' :

    import sys
    module_this = sys.argv[ 0 ]

    gw = GuessWidget( random.randrange( 100 ) )

    gw.master.title( module_this )

    gw.mainloop()

# ----------------------------------------------

Thanks again for the information
and steering me toward the master  ...

-- 
Cousin Stanley
Human Being
Phoenix, Arizona






More information about the Python-list mailing list