<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'>John, thanks for the response. <br><br>You are correct - the TListBox component "OnClick" event does indeed respond to the keyboard, but unfortunately the same event on the TListView component only responds to mouse clicks. Whether this component is just a wrapper around a MS component that only responds that way I don't know.<br><br>So, still a problem to sort out.<br><br>Also, another question - how to make one of the columns (the caption in my case) invisible - like using the "Visible" property on the columns of a DBGrid or a dataset. There is no "Visible" property on the Items or SubItems properties.<br><br>All this would have been super easy with a database but I am trying to avoid that if possible at present.<br><br><div><hr id="stopSpelling">From: johnkbird@paradise.net.nz<br>To: delphi@listserver.123.net.nz<br>Date: Mon, 28 Jul 2014 02:24:33 +1200<br>Subject: Re: [DUG] ListView - Scroll Event<br><br>
<style><!--
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">
<div style="FONT-SIZE:12pt;FONT-FAMILY:'Calibri';COLOR:#000000;">
<div>Haven’t tried with Listview, but in stringgrid and listbox, checkbox etc
the onclick event fires with the mouse, or on moving with the arrow key
(D2007). (As long as there is a current element its more or less logical
to have a click event also respond to the keyboard as it wouldn’t be much use
otherwise). I have used stringrids and listboxes to do exactly what you
want – as current record changes in the first to show more detail in a second
control.</div>
<div> </div>
<div>(With data controls often the best approach is to use the change event on
the datasource to detect the same thing).</div>
<div> </div>
<div>So try the onclick event some more.</div>
<div style="FONT-SIZE:small;TEXT-DECORATION:none;FONT-FAMILY:"Calibri";FONT-WEIGHT:normal;COLOR:#000000;FONT-STYLE:normal;DISPLAY:inline;">
<div style="FONT:10pt tahoma;">
<div><font face="Calibri" size="3"></font> </div>
<div style="BACKGROUND:#f5f5f5;">
<div style=""><b>From:</b> <a title="eaa603@hotmail.com" href="mailto:eaa603@hotmail.com">Eric A</a> </div>
<div><b>Sent:</b> Sunday, July 27, 2014 9:07 PM</div>
<div><b>To:</b> <a title="delphi@listserver.123.net.nz" href="mailto:delphi@listserver.123.net.nz">Delphi ListServer</a> </div>
<div><b>Subject:</b> [DUG] ListView - Scroll Event</div></div></div>
<div> </div></div>
<div style="FONT-SIZE:small;TEXT-DECORATION:none;FONT-FAMILY:"Calibri";FONT-WEIGHT:normal;COLOR:#000000;FONT-STYLE:normal;DISPLAY:inline;">
<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?<br><br>Eric.<br></div>
<BR><hr>
_______________________________________________<br>NZ Borland Developers Group -
Delphi mailing list<br>Post: delphi@listserver.123.net.nz<br>Admin:
http://delphi.org.nz/mailman/listinfo/delphi<br>Unsubscribe: send an email to
delphi-request@listserver.123.net.nz with Subject:
unsubscribe</div></div></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>