|
-
Mar 17th, 2011, 04:03 PM
#1
Thread Starter
New Member
Sorting Text File for Highscores
Hi there, I recently created a program and want to add a highscore table to it.
I have 'Name', 'Score', 'Date' saving to text file (using append) and can then display this list in a label, however I want to sort the list to display the top 10 scores in the label.
Any help appreciated
-
Mar 17th, 2011, 05:12 PM
#2
Re: Sorting Text File for Highscores
What does your file look like? Can you post some sample data?
-
Mar 18th, 2011, 06:59 PM
#3
Re: Sorting Text File for Highscores
 Originally Posted by CompSci_Joe
Hi there, I recently created a program and want to add a highscore table to it.
I have 'Name', 'Score', 'Date' saving to text file (using append) and can then display this list in a label, however I want to sort the list to display the top 10 scores in the label.
Any help appreciated 
Isolate the scores when the file is read and as they are encountered, add the score strings to a list box with the sorted property set to True.
After the list box is built, remove any score after the 10th.
Tags for this Thread
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
|