Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-26-2008, 11:04 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
GuiTextListCtrl - Sort by Values?

I have a GuiTextListCtrl that I'd like to sort by the following values: "Low", "Medium", "High", "Critical".

When I sort it, it sorts alphabetically. How do I get it to sort using the list above?
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #2  
Old 05-26-2008, 11:14 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
You could have it like:

PHP Code:
addRow0"0\tTitle\tCritical" ); 
and then sort it ascending and show the text list at a negative x.

This is a workaround, but it's the only way I've ever known.

Basically, have a 0 at the front, and sort it ascending. High gets 1, Medium gets 2, etc.

Wish there was a better way.
__________________
Reply With Quote
  #3  
Old 05-27-2008, 01:43 AM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by cbk1994 View Post
You could have it like:

PHP Code:
addRow0"0\tTitle\tCritical" ); 
and then sort it ascending and show the text list at a negative x.

This is a workaround, but it's the only way I've ever known.

Basically, have a 0 at the front, and sort it ascending. High gets 1, Medium gets 2, etc.

Wish there was a better way.
Bah -_-..
we should be able to define our own sort methods
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:17 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.