Jump to content
Sign in to follow this  
pixartist

Listview sorting doesnt work

Recommended Posts

pixartist

$hListView = GUICtrlCreateListView("", 8, 40, 886, 406)
_GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT))
_GUICtrlListView_AddColumn($hListView, "Title", 220)
_GUICtrlListView_AddColumn($hListView, "Author", 100)
_GUICtrlListView_AddColumn($hListView, "Category", 100)
_GUICtrlListView_AddColumn($hListView, "Date", 100)
_GUICtrlListView_AddColumn($hListView, "Rating")
_GUICtrlListView_AddColumn($hListView, "Votes")
_GUICtrlListView_AddColumn($hListView, "Weighted Rating", 100)
_GUICtrlListView_AddColumn($hListView, "Downloads")
_GUICtrlListView_AddColumn($hListView, "id", 65)oÝ÷ Ù«­¢+Ù¥ÀÌØíÑlÁtôôÄQ¡¸($ÀÌØíÑlÁtôÀ)±Í($ÀÌØí¹ÝÍÐôÀÌØíÑlÅt($ÀÌØí½±ÍÐôÀÌØíÑlÀÌØíÑlÁt´Ýt(%½ÈÀÌØí°ôÄѼÀÌØíÑlÁtÍÑÀà($%}U%
Ñɱ1¥ÍÑY¥Ý}%Ñ´ ÀÌØí¡1¥ÍÑY¥Ü°ÀÌØíÑlÀÌØí°¬Åt¤($%}U%
Ñɱ1¥ÍÑY¥Ý}MÕ%Ñ´ ÀÌØí¡1¥ÍÑY¥Ü° ÀÌØí°´Ä¤¼à°ÀÌØíÑlÀÌØí°¬Ét°Ä¤($%}U%
Ñɱ1¥ÍÑY¥Ý}MÕ%Ñ´ ÀÌØí¡1¥ÍÑY¥Ü° ÀÌØí°´Ä¤¼à°ÀÌØíÑlÀÌØí°¬Ít°È¤($%}U%
Ñɱ1¥ÍÑY¥Ý}MÕ%Ñ´ ÀÌØí¡1¥ÍÑY¥Ü° ÀÌØí°´Ä¤¼à°ÀÌØíÑlÀÌØí°¬Ñt°Ì¤($%}U%
Ñɱ1¥ÍÑY¥Ý}MÕ%Ñ´ ÀÌØí¡1¥ÍÑY¥Ü° ÀÌØí°´Ä¤¼à°ÀÌØíÑlÀÌØí°¬Õt°Ð¤($%}U%
Ñɱ1¥ÍÑY¥Ý}MÕ%Ñ´ ÀÌØí¡1¥ÍÑY¥Ü° ÀÌØí°´Ä¤¼à°ÀÌØíÑlÀÌØí°¬Ùt°Ô¤($%}U%
Ñɱ1¥ÍÑY¥Ý}MÕ%Ñ´ ÀÌØí¡1¥ÍÑY¥Ü° ÀÌØí°´Ä¤¼à°ÀÌØíÑlÀÌØí°¬Ýt°Ü¤($$($%}U%
Ñɱ1¥ÍÑY¥Ý}MÕ%Ñ´ ÀÌØí¡1¥ÍÑY¥Ü° ÀÌØí°´Ä¤¼à°ÀÌØíÑlÀÌØí±t°à¤($$(%9áÐ(%}U%
Ñɱ1¥ÍÑY¥Ý}I¥ÍÑÉM½ÉÑ
±±    ¬ ÀÌØí¡1¥ÍÑY¥Ü°ÑÉÕ°ÑÉÕ¤)¹%oÝ÷ Ù«­¢+Ù}U%
Ñɱ1¥ÍÑY¥Ý}U¹I¥ÍÑÉM½ÉÑ
±±    ¬ ÀÌØí¡1¥ÍÑY¥Ü¤

i get the little arrows when clicking the header line... but the list won't be sorted ^_^

Share this post


Link to post
Share on other sites
Authenticity

Did you call _GUICtrlListView_SortItems() with the correct column somewhere in the code?

Share this post


Link to post
Share on other sites
pixartist

Did you call _GUICtrlListView_SortItems() with the correct column somewhere in the code?

sure i forgot...

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $hListView
                ; Kick off the sort callback
                _GUICtrlListView_SortItems($hListView, GUICtrlGetState($hListView))

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  

×