arunmep has asked for the wisdom of the Perl Monks concerning the following question:
open(testhandle,"<$file1") or die("unable to open the file"); $mw = MainWindow->new( -title => "hyperlinks" ); $t = $mw->Scrolled('Text')->pack(-expand=>'y',-fill=>'both'); $tag = "tag000"; while($filedata=<testhandle>) { push(@testdata1,$filedata); } foreach $test(@searcharray) { foreach (@testdata1) { $i=1; @searcharrytest=split(/$test/); foreach $searchkey(@searcharrytest) { if(($i%2)==0) { $t->insert( 'end', $test, $tag ); $t->tagConfigure( $tag, -foreground => 'red' ); $tag++; $i=1; } $t->insert( 'end', $searchkey ); $i=2; } } }
please tell me a way to clear the contents of the scrolled widget
Edit: g0n - added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: problem with scrolled wigets
by spiritway (Vicar) on Jan 12, 2006 at 06:06 UTC |