| 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.
| Any ideas?
is the -height of your richie just missing from the code snippet you posted,
or do you really manage to create the control with zero height? 'Cause, if I
do, my field actually has zero height. Nada. From what you say, it seems to
me that your field is just one line high, so you actually would have to
scroll to the second-to-last line. Try
$Main->Rich->SendMessage (0x115, 7, 0); # scroll to bottom
$Main->Rich->SendMessage (0x115, 0, 0); # scroll one line up
But let me get this straight, please:
$Window->Richie->SendMessage (0x115, 7, 0);
sends WM_VSCROLL to Richie with nScrollCode parameter set to SB_BOTTOM.
Win32::GUI::SendMessage($logbox, 277, 7, 7);
as you had it, happens to do the same thing - the second 7 is actually
supposed to be the window handle of the scroll bar, but is unused with
SB_BOTTOM, so nothing goes foom from that error.
This works fine here with me, whether the WS_VSCROLL property is set or not.
Johan's idea of selecting past the end of the field's contents and replacing
the selection in order to force an autoscroll, works fine with textfields,
but not richedit controls (sorry Johan - dirty trivia Harry has got you
My question is: why did it not scroll the way you first had it and why does
it scroll now - or, the other way 'round: why does MY richedit scroll with
Morbus' code and not with Johan's?? I fiddled around with all the parameters
and cannot reproduce what happens at your place.