I have this AddRichEdit:

        $MW->{Console} = $MW->{MW}->AddRichEdit(
                -name => $Panels[$i],
                -pos => [0,100],
                -size => [550,180],
                -vscroll => 1,
                -hscroll => 1,
                -autohscroll => 1,
                -autovscroll => 0,
                -multiline => 1,
                -readonly => 1,
                -font => $fonts{SMALL},
        );

        for (my $i = 0l $i < 10000; $i++ ) {
$MW->{Console}->Select(99999,99999); #lines to perform the next instructions?
                $MW->{Console}->SetCharFormat (-color=> [255,0,0], );
                $MW->{Consolel}->ReplaceSel("$i\r\n", 1);
        }

After running it, there are indeed 10,000 lines of text on the AddRichEdit window. If I were to run it indefinitely, would I end up with a window of several trillion lines? My question is: how do I limit the AddRichEdit window to 500 or so lines?

I tried this within the loop to trim off excess lines:
        my $total = $MW->{Console}->GetLineCount();
        if ($total > 500) {
                $MW->{Console}->Select( 0,$total);
                $MW->{Console}->ReplaceSel('',1);
        }


Though it work, it however does not "appear" as intended.

How do you limit the number of lines anyways and make it smoothly too? I already tried LimiteText but the way I see it, this does not make any difference; the loop is already in the thousands and there were as many lines on the windows - LimiteText did not work.

Thanks.

Jaime

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Reply via email to