On Tuesday 28 February 2006 12:45, Graeme Geldenhuys wrote: > Hi AJ, > > I might be to late for you, but this is how I did my sorting in a > TListview. It doesn't need to clear the Listview while sorting. You > might need to reset the .Selected though. > > This code goes into the ColumnClick event of the TListview: > Thanks for this, though indeed it won´t help me now. Having USED a grid and seen the power of using cell-draw events to display rather than maintaining a list (instant speed increases all around - and BIG NOTICEABLE ones) I am certainly not going back, not while my program needs to handle an average of 12000 entries per session. That said, I haven´t studied your code in detail but the thought occurs to me that nearly every listview sort tutorial for delphi uses an assignment to the customsort event, just about nobody seems to use built-in sorts so perhaps the easiest way to get more compatible is simple to export the right properties from the LCL to ALLOW people to assign a customsort method - which would of course still have to be written by the user. This won´t implement tlistview.sort (for which mind you, your code may be a good start if you feel like working out how to make it a patch) but it WILL allow all those customsort based projects to work on lazarus.
Thoughts ? A.J. -- "80% Of a hardware engineer's job is application of the uncertainty principle. 80% of a software engineer's job is pretending this isn't so." A.J. Venter Chief Software Architect OpenLab International http://www.getopenlab.com | +27 82 726 5103 (South Africa) http://www.silentcoder.co.za | +55 118 162 2079 (Brazil) _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives