as shown in figure - it' easy to use images for menu items although not used in example - toolbar items can be pictures toojust like the image menu' items-simply associate small images with toolbar frame buttonsjust as we did in the image button examples we wrote in the last part of if you create toolbar images manually ahead of timeit' simple to associate them with buttons as we've learned in factit' not much more work to build them dynamically--the pil-based thumbnail image construction skills we developed in the prior might come in handy in this context as well to illustratemake sure you've installed the pil extensionand replace the toolbar construction method of example - with the following ( 've done this in file menudemo py in the examples distribution so you can run and experiment on your own)resize toolbar images on the fly with pil def maketoolbar(selfsize=( ))from pil imagetk import photoimageimage if jpegs or make new thumbs imgdir /pil/images/toolbar frame(selfcursor='hand 'relief=sunkenbd= toolbar pack(side=bottomfill=xphotos 'ora-lp -big jpg''pythonpoweredanim gif''python_conf_ora gifself toolphotoobjs [for file in photosimgobj image open(imgdir filemake new thumb imgobj thumbnail(sizeimage antialiasbest downsize filter img photoimage(imgobjbtn button(toolbarimage=imgcommand=self greetingbtn config(relief=raisedbd= btn config(width=size[ ]height=size[ ]btn pack(side=leftself toolphotoobjs append((imgimgobj)keep reference button(toolbartext='quit'command=self quitpack(side=rightfill=ywhen runthis alternative creates the window captured in figure - --the three image options available in the image menu at the top of the window are now also buttons in the toolbar at the bottomalong with simple text button for quitting on the right as beforethe cursor becomes hand over the toolbar you don' need pil at all if you're willing to use gif or supported bitmap images that you create by hand manually--simply load by filename using the standard tkinter photo objectas shown by the following alternative coding for the toolbar construction method (this is file menudemo py in the examples distribution if you're keeping scope)use unresized gifs with standard tkinter def maketoolbar(selfsize=( ))imgdir /gifs/toolbar frame(selfcursor='hand 'relief=sunkenbd= toolbar pack(side=bottomfill= tkinter tourpart