Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl TK Scrollbar Issue

Status
Not open for further replies.

clueo8

Programmer
Jun 13, 2005
47
US
I have this Read only Text window with a vertical scrollbar on the right side:

Code:
$script_output = $middle -> Scrolled ('ROText',
-height => 30, -width => 90,
-scrollbars => 'osoe',
-background => 'white')
-> pack();

I insert into this text box with:
Code:
  $script_output -> insert ('end', "My Text Sample");
  $script_output->idletasks;

I would like the scrollbar to scroll to the bottom (or the end) of my textbox everytime its filled and something new is added to it. Currently, it only adds stuff to fill the box, and the scroller gets smaller as data comes in, and the the box gets filled up. If i changed my insert from 'end' to '0.0', it puts the data in from the top, and it does sort of what I want it to do, but it would just make more sense with data to be added to the bottom.
 
Use "see" .....the scrollbar will go to the bottom of the textbox.

$script_output -> insert ('end', "My Text Sample");
$script_output -> see ('end');

dmazzini
GSM System and Telecomm Consultant

 
Again, Thank You! This worked perfectly... I 'see' now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top