ungalnanban has asked for the wisdom of the Perl Monks concerning the following question:
the above code is printing the line number and character no is ok. but I used in Scrolled widget that output is not printing. what is the problem in the following code how can I solve this?my $c=0; my $r=0; $txt = $mw->Text( -background =>'white', -width=>400, -height=>300, -selectbackground => 'skyblue', -insertwidth => 5, -borderwidth =>3, -highlightcolor => 'blue', ### after vis +it -highlightbackground => 'red' , ### default b +efore visit -xscrollcommand => sub { print"CHAT NO :",$c++; }, # Determines the callback used when the Text widget is scrolled + horizontally. -yscrollcommand => sub { print"LINR NO:",$r++; }, # Determines the callback used when the Text widget is scrolled + vertically. -padx => 5, -pady => 5, )-> pack ();
$txt = $mw->Scrolled('Text', -scrollbars => 'se', -background =>'white', -width=>400, -height=>300, -insertwidth => 5, -borderwidth =>3, -highlightcolor => 'blue', ### after visit -highlightbackground => 'red' , ### default before + visit -padx => 5, -pady => 5, -xscrollcommand => sub { print"CHAT NO :",$c++; }, # Determines the callback used when the Text widget is scrolle +d horizontally. -yscrollcommand => sub { print"LINR NO :",$r++; }, # Determines the callback used when the Text widget is scrolle +d vertically. )->pack();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [PERL Tk] printing Line number in Text widget.
by choroba (Cardinal) on May 10, 2010 at 13:35 UTC | |
|
Re: [PERL Tk] printing Line number in Text widget.
by thundergnat (Deacon) on May 10, 2010 at 17:08 UTC | |
|
Re: [PERL Tk] printing Line number in Text widget.
by Anonymous Monk on May 10, 2010 at 13:40 UTC |