Click to See Complete Forum and Search --> : clickable images


EscapeCharacter
01-26-2002, 10:10 PM
is there a way in perl/tk to create an image that acts like a button, in that it can call a sub? ive been looking over tk and cant seem to find anyway to do this.

debiandude
01-27-2002, 02:33 PM
You could do something like this:

$button = $parent->Button(-image=>'imgfile');


This will create a button that is an image so you now can use it for subs and stuff.

[ 27 January 2002: Message edited by: debiandude ]

EscapeCharacter
01-28-2002, 11:47 PM
yeah i tried that but i would like a way to do it where i can enter the coordinates and place them where ever i want instead of packing them to a certain side.