Jump to content

Recommended Posts

Posted (edited)

LV Sorting with GUICtrlRegisterListViewSort works excellent and is really fast compared to the UDF based sorting.

Thanks for this nice routine :think: .

The sorting with respect to a particular column happens whenever one clicks the appropriate LV header.

My question:

Is it possible to trigger the sorting without clicking on the LV header?

E.g. when the LV is filled with data I would like to have it sorted as if I had pressed the appropriate column.

I am aware of the LVM_SORTITEMS message but it needs the callback sort-routine as argument.

Sending a mouse click on the appropriate header item could work but is there any otherway to trigger sorting?

Regards

Edited by aec
  • 4 months later...
Posted

I've been scouring the Internet for a way to do this, but have come to the same exact conclusions as you have -- that either a way to use LVM_SORTITEMS, or a way to simulate mouse clicks on a column header is necessary. What's worse is the fact that I'm working on a listview that doesn't display the column headers in the first place, so this quickly becomes an even more difficult job without the help of LVM_SORTITEMS =T

I'd love to use GUICtrlRegisterListViewSort, but unfortunately, I can't because I can't simulate a column click. Any ideas?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...