Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GuiTextListCtrl - Sort by Values? (https://forums.graalonline.com/forums/showthread.php?t=79843)

Programmer 05-26-2008 11:04 PM

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?

cbk1994 05-26-2008 11:14 PM

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.

Programmer 05-27-2008 01:43 AM

Quote:

Originally Posted by cbk1994 (Post 1392657)
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


All times are GMT +2. The time now is 05:44 PM.

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