I'm writing my GUI using the Tcl::Tk perl module. I've created a BLT graph widget. I'd like to be able to display the graph element information if the user mouses over it. I can do this with pure Tcl/Tk/BLT, but I'm unable to find the right combination of commands within this Tcl/Tk/BLT perl hybrid.

In Tcl/Tk, I can figure out which element the user is interested in by passing a procedure %x and %y. How is this doable in perl?
When I tried to use Eval, I got strange answers:

my $graph = $frame->BLTGraph->pack();
$graph->bind('<Motion>'=>[\&displayInfo,$graph]);

sub displayInfo {
   my $graph = $_[0];
   $int->Eval("$graph element closest %x %y info -interpolate false");
}

Running with this eval command gave the error:
   bad screen distance "c63c760": bad window x-coordinate

Anyway, in summary, the X,Y coordinates of the mouse will need to be known to determine the information.
Any help would be appreciated.

ps. I don't give version information, because I figure there's a syntax issue that I'm missing. If the version info is relevant, I can provide it.


Michele

Reply via email to