As no Tk experts seem to be forthcoming, (I'm certainly not), I have just one suggestion - have you checked that $c (your canvas?) is being passed into your routine? When called from the menu command, it passes in @_ - maybe that's the canvas being passed into the menu handler.