Hi Dan,
it's not supported out of the box, but you can implement it in one of two ways:
- sorting things in the model (eg. having a trait that holds the sorted values and updates when either the list of children updates or the sort key updates; and use that as the children for the TreeNode)
- implementing a TreeNode subclass so that it's get_children returns a sorted list (or, possibly, using one of the other ways of defining nodes as discussed here: in the TreeNode documentation)
The level of complexity will depend on how dynamic your tree is: if you need to support things like drag and drop on the tree it will be more complex, but if you are just displaying a static tree structure, or one which changes only occasionally, it should be fairly straight-forward.
Hope this helps,
-- Corran