use the Scrolled constructer, it can be used to add scrollbars to widgets easier and positioning them using compass orientations is more direct forward as well as they're inherently automatic and appear when needs be. This is better and more concise than the "Scrollbar" method which requires further configuration afterwards to become automatic and so "Scrolled" rules.

Assign the text widget value to a scalar and proceed from there:

#assuming this is a part of a bigger Tk program.. ... my $textWidget=$main->Text( -height=>'20', -width=>'10' )->pack; $textWidget=$main->Scrolled( 'Text', scrollbars=>'w' #this can be n,s,e,w according to compass po +sitions. )->pack; ... MainLoop;
Update: Anyways, I don't know if this sounds easy to do or not but I guess Tk::mega can give you an insight check perldoc for it, also as has been listed in the answers $text->see{INDEX} seems to be what you need check the link provided, it is so informative, other than that run the Tk module command widget from the console, it has many other things that I hope can be helpful.

Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.

In reply to Re: PERL/Tk Scrolled Textbox: How do I tell it to automatically scroll down? by biohisham
in thread PERL/Tk Scrolled Textbox: How do I tell it to automatically scroll down? by chanklaus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.