halfondj
asked on
Listview: Ascending or descending symbol in column header
I have a listview box and I want to have the user sort by the columns. I got that implemented, but how do I display the ascending/descending symbol in the column header?
Please advise.
Thanks.
Please advise.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Actually, after reviewing the code in the example HoweverComma suggested, it worked great for me.
I'm not sure what is so hard about mine, all you need to do is D/L the code from that page and add the .bas modules to your project.
This is where I got the code I used to do just that in my programs, I don't really want to debug another while a working solution is provided.
Did you D/L and run the sample project?
This is where I got the code I used to do just that in my programs, I don't really want to debug another while a working solution is provided.
Did you D/L and run the sample project?
Glad you're running ;) we were typing at same time. Watching Packers/Jaguars and got distracted.
ASKER
Npo problem. Thanks again!!
The following method call should have cleared the ColumnHeaderIcons collection which should be place on the first line of the ColumnClick event as I illustrated above. Anyway, thanks for the points. On the other hand, I looked up HoweverComma's link and downloaded the sample project and the codes. That's a great one, HoweverComma!
'------------------------- ---------- ---------- ---
ListView1.ColumnHeaderIcon s = Nothing
'------------------------- ---------- ---------- ---
'-------------------------
ListView1.ColumnHeaderIcon
'-------------------------
ASKER
To HoweverComma: Your suggestion is a bit much, but it was a great example.
To jkaios: Your suggestion is easier to implement, but found a problem with it. When I select a different column than the one that's already sorted on, the sort icon stays in the first column I sorted on, as well as the second, etc..
Because both answers helped me a lot, I'm increasing the points for someone to assist me with solving the icon problem. I also want to split the points :).