|
-
Oct 10th, 2006, 12:06 PM
#1
Thread Starter
Frenzied Member
-
Oct 10th, 2006, 03:37 PM
#2
Re: [2005] FolderBrowserDialog Sorting????
Stumped me for a few minutes, but I see what's going on here...
When it is sorting, its stripping the leading 0 off and going to the next digit. So if you take those 0's off, its in the correct order, notice how the 2 top ones that are out of order would be in correct order if the 0 was not present, same with the one that starts with 02
-
Oct 10th, 2006, 04:37 PM
#3
Thread Starter
Frenzied Member
Re: [2005] FolderBrowserDialog Sorting????
I see what you mean now. But that still doesn't make sense. If that is how it's supposed to function then the first 4 are out of function.
-
Oct 10th, 2006, 04:51 PM
#4
Re: [2005] FolderBrowserDialog Sorting????
if there is no number after the 0, it considers it 0.. if there is a number after the 0, it is truncating it off....
I'm not saying its correct, looks like a bad sorting routine either within the framework, or in the underlying win32 control itself, but it is what it is...
-
Oct 10th, 2006, 06:45 PM
#5
Re: [2005] FolderBrowserDialog Sorting????
I think that you'll find that that is a Windows XP feature. Everyone b*tches that Folder1, Folder2 and Folder10 are sorted "alphabetically" instead of how a human would sort them, so Microsoft added functionality to XP to sort files and folders in a more "human" way. What is happening in your case is XP is reading the leading digits as a number and sorting them numerically, then those that start with the same number are sorted alphabetically after that. The first four start with "0" so the number is stripped of altogether and they are sorted alphabetically by the letters that come after the zero. The next eight all start with the number one ("01" is considered to be the number 1) so they are all sorted alphabetically on whatever comes after the "1". After that comes the those that start with the number 2, where "02" is considered the number 2. By default XP will treat leading and trailing digits in a file or folder name as numbers. It would be too hard work to treat other digits as numbers though. You can turn this functionality off in XP but it has nothing whatsoever to do with .NET.
-
Oct 10th, 2006, 09:40 PM
#6
Thread Starter
Frenzied Member
Re: [RESOLVED] [2005] FolderBrowserDialog Sorting????
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|