Re: screen display only updates on callback to text widget

Michael van Nieuwenhuize <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <6.1.1.1.2.20050506151317.02864c28@qcmail1>
Bill,

The is a update method for your mainwindow.

$mainWindow->update();

When ever you call this method it will update the entire gui. I think each 
widget might
also inherit this method. So you may want to try $t->update after each read 
to see
if it works. If not you could update mainwindow in your read loop. Not sure 
been a while since
I have done any work with text widgets. If I remember correctly update can 
eat up resources
so you may have to do some experimentation to see what works best for you.


Regards,

Mike

At 03:01 PM 5/6/2005, Bill Mezian wrote:
>Hello all,
>
>On the Win32 platform using active State 5.8x, I have a program that while
>processing a file, writes updates to a text widget, with processing
>beginning by a command subroutine from a button press:
>
>$f ->Button(-text => "Process New",
>                 -font => 'tahoma 8 bold',
>                 -activebackground => '#D0C36B',
>                 -command => \&process_data_file)
>                 ->pack(-side => 'left', -expand => 1, -fill => 'x', -pady =>
>1, -anchor => 'w');
>
>The callback to the ROText widget is:
>
>$t->insert("end", "Adding ". $dlrstnum . " " . $year . " " . $make . " " .
>$model . "\n");
>
>called from within a while loop. My problem is this, the screen display only
>updates after all of the processing has finished, rather than writing each
>line out to the window as it is being processed.
>
>Can anyone help with a suggestion on how to get the screen display to update
>as the file is processing? The behavior is also the same using a progress
>bar, and output from a ping command to the same text widget.
>
>Thanks for any help!
>
>Bill
>
>-++**==--++**==--++**==--++**==--++**==--++**==--++**==
>This message was posted through the Stanford campus mailing list
>server.  If you wish to unsubscribe from this mailing list, send the
>message body of "unsubscribe ptk" to [email protected]

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.