Advanced Search
Mail us
Home    Manuel    Links    Faq    Submit a tcl/tk Reference    Contact Us

    Some examples tcl/tk codes     Man of Bwidget     Man of blt     mkwidget screenshots     TkOgl     Video Demo real.

  How can I put/print an image on the `canvas`?
 To put an image into the `canvas` you must first create it with `image
create ...` and then embed that image into the canvas.  For example:

image create photo my_image -file [file join $tk_library demos images teapot.ppm]
pack [canvas .c]
.c create image 0 0 -anchor nw -image my_image

Unfortunately Tk does not yet support the printing of images.  You can
get this functionality by grabbing the Tk dash patch
( by Jan Nijtmans