Jump to content
Sign in to follow this  
name15

how arrange item in

Recommended Posts

name15

how arrange item in

GUICtrlCreateListView ()

like in explore when click on size will all item arrange by size up or down

Share this post


Link to post
Share on other sites
Fire

Hi,

You want sortitems in Listview?

Check AutoIT help file for :

_GUICtrlListView_SortItems()

[size="5"] [/size]

Share this post


Link to post
Share on other sites
PsaltyDS

Try the example script under _GUICtrlListView_SimpleSort().

Note that it includes a bad example in using the native GuiCtrlCreateListView() then working on it with the GuiListView.au3 UDF. If you are going to work on a control with the UDF functions, create and maintain it with the UDF functions all the way. These examples are likely to be tweaked for this in a future release.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
name15

how add one click function to $Treeview

Func MY_WM_NOTIFY($hWnd, $Msg, $wParam, $lParam)

    Switch $wParam
        Case $Treeview
            Local $tagNMHDR = DllStructCreate("int;int;int", $lParam)
            If @error Then Return
            If DllStructGetData($tagNMHDR, 3) = $NM_DBLCLK Then $fDblClk = True
        Case $Listview
                ; Kick off the sort callback
                Local $tagNMHDR = DllStructCreate("int;int;int", $lParam)
                If @error Then Return
                If DllStructGetData($tagNMHDR, 3) = $LVN_COLUMNCLICK Then
                _GUICtrlListView_RegisterSortCallBack(GUICtrlGetHandle($Listview))
                _GUICtrlListView_SortItems($Listview, GUICtrlGetState($Listview))
                    _GUICtrlListView_UnRegisterSortCallBack(GUICtrlGetHandle($Listview))
                EndIf
    EndSwitch

EndFunc
Edited by name15

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.