MCP Posted December 1, 2007 Posted December 1, 2007 I would like to have my listview getting sorted each time I click on a header column. If I have, for instance, the following: ... Local $nListView_Width = 395 $lvHandle = GUICtrlCreateListView($L_GUI_LIST_COLUMNS, $x, 25, $nListView_Width, $nHeight, _ BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER, $LVS_SORTASCENDING), _ BitOR($LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT)) _GUICtrlListView_SetColumnWidth($lvHandle, 0, $nListView_Width) _GUICtrlListView_SetColumnWidth($lvHandle, 1, 700) _GUICtrlListView_SetColumnWidth($lvHandle, 2, 160) GUICtrlSetState($lvHandle, $GUI_DROPACCEPTED) ... the listview items ares displayed in an ascending order based on the first column content, but that only works when I create the listview. I need to be able sort the items by clicking on the different columns.
randallc Posted December 1, 2007 Posted December 1, 2007 I would like to have my listview getting sorted each time I click on a header column. If I have, for instance, the following: ... Local $nListView_Width = 395 $lvHandle = GUICtrlCreateListView($L_GUI_LIST_COLUMNS, $x, 25, $nListView_Width, $nHeight, _ BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER, $LVS_SORTASCENDING), _ BitOR($LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT)) _GUICtrlListView_SetColumnWidth($lvHandle, 0, $nListView_Width) _GUICtrlListView_SetColumnWidth($lvHandle, 1, 700) _GUICtrlListView_SetColumnWidth($lvHandle, 2, 160) GUICtrlSetState($lvHandle, $GUI_DROPACCEPTED) ... the listview items ares displayed in an ascending order based on the first column content, but that only works when I create the listview. I need to be able sort the items by clicking on the different columns.Hi, See Gary's post example; replacement for _GUICtrlListView_SimpleSortBest, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
MCP Posted December 2, 2007 Author Posted December 2, 2007 See Gary's post example;replacement for _GUICtrlListView_SimpleSortBest, RandallThank you. I am still upgrading to the external listview functions and still Gary's solution does not work for me, but it was very helpful indeed to look at his code. I am sure that that is the solution.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now