Morbus wrote:
Neat idea, but now, instead of seeing the last $message being passed as
the first line of the RichEdit (scrolled to that first line), I see a
blank screen - the autoscroll goes past my last line... Course, changing
the \n around fixes that (with the side effect of a blank first line), but
my autoscrolling problem is still there.
Sorry I'm dense, I don't get it. Try this:
----------
#!/usr/local/bin/perl -w
use strict;
use Win32::GUI;
my $winMain = new Win32::GUI::Window(
-left => 13,
-top => 32,
-width => 439,
-height => 260,
-name => "winMain",
-text => "Autoscroller"
);
$winMain->AddRichEdit(
-text => "",
-name => "rePOD",
-left => 0,
-top => 0,
-width => 400,
-height => 220,
-style =>
WS_CHILD | WS_VISIBLE | ES_LEFT |
ES_MULTILINE |
ES_AUTOVSCROLL | WS_VSCROLL |
ES_AUTOHSCROLL | WS_HSCROLL |
ES_READONLY,
-exstyle => WS_EX_CLIENTEDGE,
-tabstop => 1,
);
$winMain->Show();
for my $i (1..40) {
Win32::GUI::DoEvents();
$winMain->rePOD->Select(999999,999999); #Stolen from the PM chatterbox
$winMain->rePOD->ReplaceSel("line $i\n",1);
select(undef, undef, undef, 0.25);
}
#EOF
----------
This will scroll the RichEdit as you "print" more text into it. Is that not
what you wanted?
If you want to scroll the RichEdit to a certain line, download the Oasis
source and look at the Win32::GUI::AdHoc module. It contains the sub
richEditScroll($reControl, $noCol, $noLines)
which sends the EM_LINESCROLL message to the RichEdit control.
/J
--
Johan Lindström, Sourcerer, Boss Casinos Ltd, Antigua
[EMAIL PROTECTED]
NetZero Platinum
No Banner Ads and Unlimited Access
Sign Up Today - Only $9.95 per month!
http://www.netzero.net