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 10-30-2007, 04:13 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
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?
__________________
Reply With Quote
  #2  
Old 10-30-2007, 04:46 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
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.
__________________
Do it with a DON!
Reply With Quote
  #3  
Old 11-01-2007, 07:05 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
*bump*

I forgot I made this topic, so does anyone know?
__________________
Reply With Quote
  #4  
Old 11-02-2007, 01:43 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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
Reply With Quote
  #5  
Old 11-03-2007, 12:42 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Thanks I'm glad I finally got that sorted out, no pun intended.
__________________
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:27 AM.


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