![]() |
GuiTextListCtrl
Could anyone explain how the following commands works, preferably with an example? :)
PHP Code:
|
Well, I just use sort() which alphabatizes. I assume those change the way it sorts.
|
Quote:
For sortmode, it can be either 'ascending' or 'descending', e.g PHP Code:
And, per what cbkbud said, you need to call sort() for it to actually sort. |
most likely:
sortcolumn = 1; // To sort the second column sort(); |
M-m-m-meeega Buuuump!
Is there a way to sort by value (well I know there's a sortmode = "value";, but keep reading!)? Sorting numbers does fishy sorting like... 12, 34, 260 would be sorted as: 12 260 32 A bit frustrating when making a shop GUI and want to sort it by item costs :( |
I guess not.
|
Quote:
Quote:
|
Quote:
|
Beside graal.net you can also easily search on the Graal forums for stuff :) Quoting http://forums.graalonline.com/forums...81&postcount=2 :
For the tree view you set attributes like this: sortmode = "value"; sortorder = "descending"; groupsortorder = "ascending"; For the nodes then: sortvalue = 1; sortgroup = 2; That would sort the nodes after the value you have assigned to them. When you set sortmode="name" then it will be sorted alphabetically. The sort group can be used to let some types of nodes always appear at the top, e.g. in a folder view you would want to display the folders at the top. --- sortmode can be "value", "name" or "extension" |
Right, thanks! :)
Exactly how does groupsortorder and sortgroup work though? |
The text list control is displaying group by group, if groupsortorder is ascending then entries would be displayed like 1,1,1,2,2,2,2 (entry.sortgroup). So basicly 'groupsortmode' is always 'value'.
When the entries have the same group then the entry.sortvalue decides if they are above or below. In the playerlist buddies have group 1, normal people 2, ignored people 3 (or something like that). The players are sorted either alphabetically (sortmode 'name') or by time of arrival/last pm (sortmode 'value'). |
Naruhodo! Arigato :)
|
Quote:
|
Quote:
... or should I say kimatte imasu? |
Quote:
English plox? |
Quote:
Also Stefan, would it be possible for you to implement so you can change textprofiles (well, text manipulating in general) for each individual row? |
You can (/scripthelp GuiTextListEntry) :
PHP Code:
|
Quote:
I was trying: PHP Code:
|
Quote:
|
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 03:34 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.