pootie tang Posted July 15, 2008 Posted July 15, 2008 Is there any way to specify a column and sort ascending or descending on a SysListView control. I used to use the ListView and Header functions from Auto3Lib to accomplish. I looked at _GUICtrlListView_SortItems and _GUICtrlListView_SimpleSort but not sure how to get them to work. Thanks in advance.
Paulie Posted July 15, 2008 Posted July 15, 2008 Get the ControlID of the listview (Autoit3 Window Info Tool) Get the Handle of the control from the control ID ( ControlGetHandle() ) Pass the Handle to your _GUICtrlListView_SortItems() or _GUICtrlListView_SimpleSort() functions
pootie tang Posted July 15, 2008 Author Posted July 15, 2008 (edited) Get the ControlID of the listview (Autoit3 Window Info Tool) Get the Handle of the control from the control ID ( ControlGetHandle() ) Pass the Handle to your _GUICtrlListView_SortItems() or _GUICtrlListView_SimpleSort() functions Paulie, Thanks. For SimpleSort, I'm not exactly sure about the use of the 2nd argument. From the example, it looks like an array that is declared to be the size of the number of columns. The items in the syslistview cannot be removed and put back. When I tried to use it as: Global $B_DESCENDING[_GUICtrlListView_GetColumnCount($hlv)] _GUICtrlListView_SimpleSort($hlv,$B_DESCENDING,1) where $hlv is the handle returned from controlgethandle, it crashes the .NET application. I need to be able to click the appropriate column and have it be ascending or descending. any thoughts? Thanks. Edited July 15, 2008 by pootie tang
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