in reply to Tk and scrollbars

You can remember the scrollbar position before printing to the widget and restore the position after printing. E.g:
sub mymain() { # This would normally be real text my(@old_x_view) = $text->xview; $counter++; print "this is a very long line we need a scrollbar on the x axis... +..... this is a very long line we need a scrollbar on the x axis..... +... this is a very long line we need a scrollbar on the x axis....... +. well the number is current = " . $counter . " \n"; $text->xview(moveto => $old_x_view[0]); }

Replies are listed 'Best First'.
Re^2: Tk and scrollbars
by jammin2night (Initiate) on Jul 09, 2004 at 12:27 UTC
    Thank you - my(@old_x_view) = $text->xview; $text->xview(moveto => $old_x_view[0]); this works perfectly --jammin