Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Updating the same line Text Widget

by lamprecht (Friar)
on Oct 20, 2010 at 20:57 UTC ( [id://866407]=note: print w/replies, xml ) Need Help??


in reply to Updating the same line Text Widget

Hi,

there is an invisible newline at the end of a Text widgets content. - Plus possibly one as part of the last line you inserted?

use warnings; use strict; use Tk; my $mw = tkinit; my $text_log = $mw->Text->pack; $text_log->insert(end => "test\n") for (0..2); my $i = 0; $mw->repeat(500, sub{ $text_log->delete('end -2line linestart', 'end -1line' +); $text_log->insert('end', "Current Size:$i\n"); $i++; }); MainLoop;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://866407]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2026-04-12 00:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.