frame .mv wm title . "Animation in canvas" pack .mv canvas .mv.c pack .mv.c button .mv.c.but -text Credits -command displayInfo
The following Tcl/Tk command appended to the script above, creates a window inside the canvas at x,y position 218,153 for the button ".mv.c.but".
.mv.c create window 218 153 -window .mv.c.but
Note that in this simple example, we could have used a tagged text string and used tag binding to invoke "displayInfo" but the principle of embedding widgets is powerful and appropriate mechanism if you wish to invoke complex ready-made soultions.
If you execute this script you will see: