Embedding in Tkinter (reprise)

Pier Paolo Glave pierpaolo.glave at ciaolab.com
Wed Jun 26 10:26:02 CEST 2002


Thank you Jeff, your code worked at first launch!
(except only for "frame" which had to be capitalized ;-)

Bye
--
Pier Paolo Glave

Jeff Epler <jepler at unpythonic.net> wrote in message news:<mailman.1025012704.15005.python-list at python.org>...
> You first need to make sure your Python's tkinter is linked with blt.
> This can be a bit of a mess ...
> 
> Then, guessing, you could start by trying to define a Container class
> in Python, something like
>     class Container(Widget):
> 	    def __init__(self, master=None, cnf={}, **kw):
> 		    Widget.__init__(self, master, 'blt::container', cnf, kw)
> 
> Now, the program would look something like
>     t = Tk()
>     t.tk.call("package", "require", "BLT")
>     f = frame(t)
>     os.system("xclock &")
>     c = Container(f)
>     f.pack(fill="both", expand="yes")
>     c.pack(fill="both", expand="yes", padx=".1i", pady=".1i")
>     c.configure(relief="raised", bd=2, name="xclock")
>     t.mainloop()
> 
> Jeff



More information about the Python-list mailing list