Article View: borland.public.delphi.vcl.components.using.general
Article #175OnSelectItem TListView OwnerData
From: Jim Levett
Date: Mon, 21 Jul 2008 12:19
Date: Mon, 21 Jul 2008 12:19
29 lines
2248 bytes
2248 bytes
Hi people, I`m using Delphi 5, from way back when, and am having huge difficulties with a TListView. My list of items is over 16000 and I require a procedure which with every item selected, adds a property from that selected items associated object into a stringlist. However two things seem not to work when using an OwnerData/OnData list. 1; When selecting a number of items using a click for the first item, and then holding shift and clicking on the last desired item, the onselectitem event is not called at all after the first click, therefore missing out a whole list of selected items and deselected items. 2; When the event is called for an item that has just lost its selection (due to another item being selected etc) the OnSelectItem event is called with Selcted = False but the Item object is nil. Basically, I`m hoping somebody here is able suggest how I can get around this problem. Currently, instead of just adding/removing the data for the respective selected/deselected items as the selection event is called, I`m having to go through the entire list using getnextitem and reconstructing the stringlist of data each time. This seems like quite an overhead with 16000+ items (this grows monthly by 200 or so entries) thank you for any help
Technical Details
Message-ID:
<48847edc$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 16f96a,767becccadf68b19,start X-Google-Attributes: gid16f96a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 21 Jul 2008 13:19:36 +0100 From: Jim Levett <jim.levett@kaleidovision.co.uk> User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 Newsgroups: borland.public.delphi.vcl.components.using.general Subject: OnSelectItem TListView OwnerData Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 217.146.104.42 Message-ID: <48847edc$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1216642780 217.146.104.42 (21 Jul 2008 05:19:40 -0700) Lines: 29 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail X-Original-Bytes: 2079