in reply to Using Perl/Tk text tags

Hi,

I can't see enough from your example to know if this will really help you. But the easiest thing to do is pass your text to your subroutine the bind method:

$lb->tagBind ('cr_link', "<Button-1>", [ \&show_cr, "cr_link" ]);
This may not work if you have multiple items tagged with 'cr_link'. To work around that you might have to loop through all of your items with that tag and bind them seperately so when the callback occurs you can tell them apart.
#psuedo code my $i = 0; my $h = {}; for (@tags) { $lb->tagConfigure("cr_link$i", -options => 'values'); $lb->tagBind("cr_link$i", "<Button-1>", [ \&show_cr, "$i" ]); $h->{$i} = "Something useful here like $text_of_lb->{$i}"; $i++; }

Again, psuedo-code so YMMV. Hope that helps,
{NULE}
--
http://www.nule.org