Modify

Opened 15 years ago

Closed 13 years ago

#1759 closed Bug (Fixed)

Strange listview sort

Reported by: Eric Owned by: trancexx
Milestone: 3.3.9.5 Component: Standard UDFs
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

Hello,

I have a strange result with listview sort.

When i sort à listview on Windows 7 the sort seems to be good.

C:\Documents and Settings\XPMUser\Bureau\044-0610.txt
C:\Documents and Settings\XPMUser\Bureau\annotatif.txt
C:\Documents and Settings\XPMUser\Bureau\UTB.txt
C:\UTB rue de rivoli-indice-C.txt

But on Windows XP the sort is not the same

C:\Documents and Settings\XPMUser\Bureau\044-0610.txt
C:\Documents and Settings\XPMUser\Bureau\annotatif.txt
C:\UTB rue de rivoli-indice-C.txt
C:\Documents and Settings\XPMUser\Bureau\UTB.txt

Is it a Windows XP or Autoit Problem ?

(If you have 2 column on the listview the sort is good on windows XP too, but not with 1 column)

Here the code for try

Thanks

#include <GUIConstantsEx.au3>

#include <GuiListView.au3>

$gui = GUICreate("titre", 730, 490, -1, -1, -1)
$listefichier = GUICtrlCreateListView("Fichiers", 20, 60, 430, 340) 

GUICtrlCreateListViewItem("C:\UTB rue de rivoli-indice-C.txt", $listefichier) 
GUICtrlCreateListViewItem("C:\Documents and Settings\XPMUser\Bureau\UTB.txt", $listefichier)
GUICtrlCreateListViewItem("C:\Documents and Settings\XPMUser\Bureau\annotatif.txt", $listefichier)
GUICtrlCreateListViewItem("C:\Documents and Settings\XPMUser\Bureau\044-0610.txt", $listefichier)

_GUICtrlListView_SetColumnWidth($listefichier, 0, $LVSCW_AUTOSIZE)
 
GUISetState(@SW_SHOW) 

_GUICtrlListView_RegisterSortCallBack($listefichier)
while 1
$msg = GUIGetMsg()

    Select
        Case $msg = $GUI_EVENT_CLOSE

            exit

        Case $msg = $listefichier
            _GUICtrlListView_SortItems($listefichier, GUICtrlGetState($listefichier))
        case Else

    EndSelect

    WEnd

    _GUICtrlListView_UnRegisterSortCallBack($listefichier)

Attachments (0)

Change History (3)

comment:1 by MrCreatoR <mscreator@…>, 15 years ago

Confirmed:

AutoIt:3.3.6.1   (Os:WIN_XP/X86/Service Pack 3   Language:0419 Keyboard:00000409 Cpu:X64)

Strange indeed. It seems that _GUICtrlListView_FindItem can not find the item, it returns -1 on the last two. Perhaps the problem is in the structure and the params that is set for it.

comment:2 by Jon, 15 years ago

Component: AutoItStandard UDFs
Owner: set to Gary

comment:3 by trancexx, 13 years ago

Milestone: 3.3.9.5
Owner: changed from Gary to trancexx
Resolution: Fixed
Status: newclosed

Fixed by revision [7300] in version: 3.3.9.5

Modify Ticket

Action
as closed The owner will remain trancexx.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.