Jump to content

Search the Community

Showing results for tags 'numeric'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi, just a short question. I 've got a lisitview with a few columns and I want to register a different sort for two kinds of columns. I 've got a solution, but I don't think it is a good one. Example : Col A = Names (Strings) Col B = Age (Integers) Right now I'm doing this: 1. _GUICtrlListView_RegisterSortCallBack 2. In my WM_NOTIFY Case GUICtrlGetHandle($search_LV) Switch $iCode Case $LVN_COLUMNCLICK ; A column was clicked Local $tInfo = DllStructCreate($tagNMLISTVIEW, $iLparam) ; Kick off the sort callback ;~ ConsoleWrite('SEARCH_LV Column geklickt' & @LF) ConsoleWrite("Sort: " & DllStructGetData($tInfo, 'SubItem')) If $ColumnSorted <> DllStructGetData($tInfo, 'SubItem') Then _GUICtrlListView_UnRegisterSortCallBack($search_LV) ConsoleWrite('NEU' & @CRLF) EndIf $ColumnSorted = DllStructGetData($tInfo, 'SubItem') If DllStructGetData($tInfo, 'SubItem') = 9 Or DllStructGetData($tInfo, 'SubItem') = 10 Then ConsoleWrite('True: ' & _GUICtrlListView_RegisterSortCallBack($search_LV, True) & @CRLF) Else ConsoleWrite('False ' & _GUICtrlListView_RegisterSortCallBack($search_LV, False) & @CRLF) EndIf _GUICtrlListView_SortItems($search_LV, DllStructGetData($tInfo, 'SubItem')) So, I store the column clicked in a global variable. If the column is clicked again (sort asc or desc) then all is fine, if another column then the one before is clicked, I unregister the callback and create a new one. The new callback (in the if) depends on the column clicked because of the content to sort (strings or numbers). Is there an easier / better way? Do I have to use my own sorting function with GuiCtrlRegisterListViewSort? Edit: It still doesn't work in every case (just noticed). Thanks Mega
×
×
  • Create New...