Sign in to follow this  
Followers 0
Ejoc

ListView sort w/ unicode

7 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites

Might try _GUICtrlListView_RegisterSortCallBack

You sir are a genius. Thanks a bunch


Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs

Share this post


Link to post
Share on other sites

You sir are a genius. Thanks a bunch

Let me know if that works for you.

Forgot to mention that is in 3.2.11.0 updated in 3.2.11.1


SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

_GUICtrlListView_SetUnicodeFormat($hListView, True)

Edited by tryer777

Share this post


Link to post
Share on other sites

$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

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  
Followers 0