Jump to content
Sign in to follow this  
dirty

help with sorting listview

Recommended Posts

dirty

I am trying to make this as simple as i can and i need help

I have GUI with $results= listview

$GUIGetMsg = guigetmsg()

 
If $GUIGetMsg = GUICtrlRead (GUICtrlRead ($Results)) Then
        _GUICtrlListView_RegisterSortCallBack($Results, False)
        _GUICtrlListView_RegisterSortCallBack($Results)
        $Selected = _GUICtrlListView_GetSelectedColumn ($Results) ;column index
        _GUICtrlListView_SortItems ($Results,$Selected);Sort
    EndIf

Not sure how to modify this code to sort my columns

It keeps sorting them not sure in what order in a loop, because this part of the script is in main GUI loop (i bet you noticed $GUIGetMsg = guigetmsg() )

\Can anyone help ?

Thanks in advance

Share this post


Link to post
Share on other sites
dirty

never mind, got it.

_GUICtrlListView_RegisterSortCallBack($Results) ;before loop

If $GUIGetMsg = $Results Then _GUICtrlListView_SortItems($Results, GUICtrlGetState($Results)) ; inside loop

can MODS delete this post

But then on this note, Help file needs to be edited since it says sorting is not supported.

Edited by dirty

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×