package require Img
frame .b
image create photo picture -file 33.jpg
canvas .b.c
pack .b.c
.b.c create image 1 1 -anchor nw -image picture
pack .b
You need to tell the canvas to scroll. This is done by adding
scrollbars and by defining the scrollable area, like this:
package require Img
pack [frame .b]
image create photo MyMap -file 33.jpg
# Make the canvas and logically connect the scrollbars to it
canvas .b.c -xscroll {.b.h set} -yscroll {.b.v set} -
highlightthickness 0
scrollbar .b.h -orient horizontal -command {.b.c xview}
scrollbar .b.v -orient vertical -command {.b.c yview}
# We use grid because it is easier to do the layout right that way
grid .b.c .b.v -sticky nsew
grid .b.h -sticky nsew
grid columnconfigure .b 0 -weight 1
grid rowconfigure .b 0 -weight 1
# Now add the image and tell the canvas that's what is scrolling
over
.b.c create image 1 1 -anchor nw -image MyMap -tag mymap
.b.c configure -scrollregion [.b.c bbox mymap]
Donal.