Here is my code
use Tkx; use Tkx::FindBar; use strict; use warnings; my $name; my $mw=Tkx::widget->new('.'); my $text=$mw->new_text(-width=>20,height=>10); my $findbar=$mw->new_tkx_FindBar(-textwidget=>$text); foreach(qw/David Mary William/) { $text->insert('end',"$_\n"); } $findbar->g_pack(); $text-g_pack(); $findbar->show(); $text->g_bind('<Return>',sub{$name=$text->get(qw/sel.first sel.last);p +rint "The name is $name\n"});
In reply to Re^7: Getting selection from Tkx text
by dabella12
in thread Getting selection from Tkx text
by dabella12
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |