Well, to get the _Change event working, just send this message:
$RichEdit->SendMessage(0x445, 0, 1);
Unfortunately, theres a slight problem...
This line is complaining that it needs another paramater.
my $currentline = $RichEdit->LineFromChar;
---------------------------------------------------
From: "Sean Healy" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], perl-win32-gui-users@lists.sourceforge.net
Subject: Re: [perl-win32-gui-users] (no subject)
Date: Sat, 23 Feb 2002 10:39:39 -0900
>Also, does anyone know why, in multiline RE fields at least, if you just
>keep hitting enter your cursor goes off the edit window and you have to
>scroll down manually? Is there a way to make it focus on the cursor
>automatically?
A solution to this has been posted before, and someone may hvae a record of
it, but here's a possible solution:
($x,$y) = $RichEdit->Selection;
$currentline = $RichEdit->LineFromChar;
while (1)
{
my $firstline = $RichEdit->FirstVisibleLine;
my $linecount = Win32::GUI::SendMessage($RichEdit,EM_GETLINECOUNT,0,0);
my $lastline = $firstline + $linecount - 1;
last if ($lastline >= $currentline);
Win32::GUI::SendMessage($RichEdit,EM_SCROLL,SB_LINEDOWN,0);
}
This code has not been tested, but it should work. You'd have to put in the
'_Change' event of $RichEdit. (I have not been able to get the '_Change'
event to work, but maybe someone has a solution for that problem.) A little
modification, and you should be able to always make the current selection
visible.
EM_GETLINECOUNT = 0x00ba
EM_SCROLL = 0x00b5
SB_LINEUP = 0
SB_LINEDOWN = 1
SB_PAGEUP = 2
SB_PAGEDOWN = 3
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
--__--__--
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
End of Perl-Win32-GUI-Users Digest
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx