<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Yes, multiple OnChange events are generated on the ListView control, for
both mouse clicks and navigation key depressions, as follows:<br><br>a) First mouse click or down arrow/PgDn key depression:<br>- Item = new selection<br><br>b) subsequent mouse clicks or down arrow/PgDn key depressions:<br>- Item - current selection<br>- Item= nil<br>- Item = new selection<br><br>Seems messy ...<br><br><div><hr id="stopSpelling">From: robo555@gmail.com<br>Date: Sun, 27 Jul 2014 12:28:33 +0200<br>To: delphi@listserver.123.net.nz<br>Subject: Re: [DUG] ListView - Scroll Event<br><br><div dir="ltr">From memory, when a record changes, first an event gets fired where selected item is nil, then a second event gets fire where selected item is the new item.<br></div><div class="ecxgmail_extra"><br><br><div class="ecxgmail_quote">
On Sun, Jul 27, 2014 at 11:07 AM, Eric A <span dir="ltr"><<a href="mailto:eaa603@hotmail.com" target="_blank">eaa603@hotmail.com</a>></span> wrote:<br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">(Delphi 7)<br><br>I wish to detect the user selecting a row (item) in a ListView component to display child records for the item in another control. <br><br>There is no "OnScroll" event for this control. I can use the "OnClick" event OK for a selection cia the mouse, but how do I detect when a user scrolls on to a record by using the arrow keys (or PgUp, PgDn or moving the scrollbar ?<br>
<br>I have tried the using the OnChange event but it seems that there are two events generated for each movement by the arrow keys.<br><br>Does anyone have a code snippet to accomplish this?<span class="ecxHOEnZb"><font color="#888888"><br>
<br>Eric.<br>                                            </font></span></div></div>
<br>_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe<br></blockquote></div><br></div>
<br>_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@listserver.123.net.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request@listserver.123.net.nz with Subject: unsubscribe</div>                                            </div></body>
</html>