Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   How to use sort() in GuiTreeViewCtrl? (https://forums.graalonline.com/forums/showthread.php?t=77370)

Inverness 10-30-2007 04:13 AM

How to use sort() in GuiTreeViewCtrl?
 
I checked the Wiki for this and it only says the variable is either a string or an integer and I have no idea how to use it. Honestly, the lack of documentation is irritating.

Does anyone know how to use the sort() and its options in the GuiTreeViewCtrl?

zokemon 10-30-2007 04:46 AM

Yeah I've never figured it out my self. Would be somewhat useful to know even though there has been very few instances I could have it before.

Inverness 11-01-2007 07:05 AM

*bump*

I forgot I made this topic, so does anyone know?

Admins 11-02-2007 01:43 AM

It's working similar to the GuiListViewCtrl sorting.

Options:
treeview.sortmode = "value" or "name" or "extension"
treeview.sortorder = "ascending" or "descending"
treeview.groupsortorder = "ascending" or "descending"
node.sortvalue - number
node.sortgroup - number

Sorting:
compare by node.sortgroup
if that is the same:
if mode is "value": compare by node.sortvalue
if mode is "extension": compare by extractfileext(node.name)
if they are still the same, compare simply by their name

Inverness 11-03-2007 12:42 AM

Thanks I'm glad I finally got that sorted out, no pun intended.


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

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