ghosh123 has asked for the wisdom of the Perl Monks concerning the following question:
Hi
I have a Scrolled Text widget in my application. I am trying to implement an incremental search of a string on this text widget.
I have come up with the following logic , but it only highlights the first occurence and not the remaining ocuurences. Please help me to make it incremental for the entire text widget.
Following is my code
sub nextText { my $string = ${$searchText->cget(-textvariable)}; $textWindow->FindNext("-forwards","-exact", '-nocase', $string ); }
$searchText is an Entry widget to write the search string and $textWindow is the Tk::Scrolled ('Text') object .
Thanks.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl tk FindNext in a text widget
by thundergnat (Deacon) on May 29, 2013 at 14:28 UTC | |
by ghosh123 (Monk) on May 30, 2013 at 06:38 UTC | |
by Anonymous Monk on May 31, 2013 at 07:10 UTC | |
by ghosh123 (Monk) on May 31, 2013 at 07:26 UTC | |
by Anonymous Monk on May 31, 2013 at 08:00 UTC | |
| |
Re: Perl tk FindNext in a text widget
by Anonymous Monk on Jun 30, 2013 at 06:15 UTC |