Jump to content

ListView sort w/ unicode


Ejoc
 Share

Recommended Posts

Is there an existing way to sort a ListView that may contain unicode that does not result in the unicode being converted to question marks?

I'm looking to avoid reinventing the wheel if someone has already done it.

*edit

Forgot to mention that I did try _GUICtrlListView_SimpleSort and except for the unicode converting to ? it does what I need

Edited by Ejoc
Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Link to comment
Share on other sites

Is there an existing way to sort a ListView that may contain unicode that does not result in the unicode being converted to question marks?

I'm looking to avoid reinventing the wheel if someone has already done it.

Might try _GUICtrlListView_RegisterSortCallBack

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Works like a champ and it only ended up being 3 lines of code, not all together obviously:

_GUICtrlListView_RegisterSortCallBack($hList)

_GUICtrlListView_SortItems($hList, GUICtrlGetState($hList))

_GUICtrlListView_UnRegisterSortCallBack($hList)

The unicode is sorted after "" and before "A" but that doesn't matter one bit.

*edit

Oh, and after yesterday I made sure to update to 3.2.11.1, so this code did work with that version of AutoIt

Edited by Ejoc
Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Link to comment
Share on other sites

  • 2 months later...

$hListView = _GUICtrlListView_Create($hGUI, "", 14, 65, 713, 587)

_GUICtrlListView_SetUnicodeFormat($hListView, True)

Something much easier would be to install the beta as they use unicode as standard in listviews since 3.2.11.11
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...