En Tue, 24 Feb 2009 02:56:12 -0200, Peter Billam <pe...@www.pjb.com.au> escribió:

As a newbie, starting with Python3, I'm working my way through Mark
Summerfield's tkinter examples.  In the toolbar, there's lines like:

    image = os.path.join(os.path.dirname(__file__), image)
    image = tkinter.PhotoImage(file=image)

which are always failing because the icons are in the wrong place
and I can't help but wonder if I can put all these little images
in the application itself, either as b'whatever' or uuencoded or
in svg etc, and then invoke some suitable variation of the
    image = tkinter.PhotoImage(file=image)
or of the
    button = tkinter.Button(toolbar, image=image, command=command)
command ?  (I did try help('tkinter.PhotoImage') but didn't spot a
magic key (unless it's "data=something, format=something")) ...

Almost; see the best documentation source for tkinter:
http://effbot.org/tkinterbook/photoimage.htm

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to