What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Question] ListViewControl - Numeric sortable Columns

[Question] ListViewControl - Numeric sortable Columns
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [Question] ListViewControl - Numeric sortable Columns
Sorting columns doesn't seem to be possible yet as there are no functions or events for it (yet).

Also, using the Windows APIs and subclassing the listview will not work because you must use a callback function to be able to tell the sort APIs how to sort. Which isn't supported in JScript.

However, you can make some workarounds. But those will be just that: dodgy workarounds. eg: You could subclass the listview and detect a column button click. Upon this detection you could clear the entire listview and recreate it using the array you used to store all the elements, but sort it first. But I suggest you don't think about implementing something like this on large lists as it will be relativly slow. Not to mention that user selections, tick boxes, etc all will be cleared each time too (unless you first store those too, and reset them after the new listview is filled in... but which will slow things down even more).

So, either fill your listview with an already sorted list, use the different XML tags and stuff to have a prefixed sort order, or wait until Patchou implements a function/event for it so you can sort on the fly.

This post was edited on 01-12-2007 at 05:05 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
01-12-2007 04:59 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Question] ListViewControl - Numeric sortable Columns - by tryxter on 01-11-2007 at 11:00 PM
RE: [Question] ListViewControl - Numeric sortable Columns - by CookieRevised on 01-12-2007 at 04:59 AM
RE: [Question] ListViewControl - Numeric sortable Columns - by tryxter on 01-12-2007 at 11:31 AM
RE: [Question] ListViewControl - Numeric sortable Columns - by Mnjul on 01-12-2007 at 04:41 PM
RE: [Question] ListViewControl - Numeric sortable Columns - by markee on 01-13-2007 at 06:09 AM
RE: [Question] ListViewControl - Numeric sortable Columns - by CookieRevised on 01-13-2007 at 07:22 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On