Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

show sorting arrow in listview column header?



  • Please log in to reply
6 replies to this topic
gwarble
  • Members
  • 624 posts
  • Last active: Aug 12 2016 07:49 PM
  • Joined: 23 May 2009
anyone know if its possible to have a ListView show the sorting arrow after the column title, like how windows explorer listviews do...

thanks
- gwarble

CodeKiller
  • Members
  • 2067 posts
  • Last active: Feb 26 2016 09:30 AM
  • Joined: 10 Jul 2008
Windows XP doesn't have Arrow in its listview... :-)

gwarble
  • Members
  • 624 posts
  • Last active: Aug 12 2016 07:49 PM
  • Joined: 23 May 2009
hmm... i beg to differ, at least in XP Pro SP3 it does, i'm looking at them now...

also checked a win7 explorer listview, also has it (but its at the very top of the bar)

while checking win7 i realized maybe you think i'm asking about the dropdown at the right of the column header, but i'm just looking for the visual indicator showing which column is the sorted one (and up or down)

its been in windows for as long as i can remember, but at least XP

thanks
- gwarble

VxE
  • Moderators
  • 3622 posts
  • Last active: Dec 24 2015 02:21 AM
  • Joined: 07 Oct 2006
It looks like you'll have to dive into the hairy scary world of the windows API.

The HDM_SETITEM message is used to modify an item in a listview's header. The HDITEM structure has a member called 'fmt' which is essentially a group of bitflags, two of which are named HDF_SORTDOWN or HDF_SORTUP, and they seem responsible for putting that little arrow next to the column name.

CodeKiller
  • Members
  • 2067 posts
  • Last active: Feb 26 2016 09:30 AM
  • Joined: 10 Jul 2008
Ok... I looked at the only view that have no arrow : workstation (at the right pane you can see all your drives).

Sorry... -_-'

gwarble
  • Members
  • 624 posts
  • Last active: Aug 12 2016 07:49 PM
  • Joined: 23 May 2009
youch, sounds complicated

thanks

gwarble
  • Members
  • 624 posts
  • Last active: Aug 12 2016 07:49 PM
  • Joined: 23 May 2009
✓  Best Answer
found a solution to this, FYI

<!-- m -->http://www.autohotke...pic.php?t=69642<!-- m -->