From 6c9ced9be238dee06edb573c7a9024d7ce380ec0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 3 Feb 2018 20:42:03 +0100 Subject: [PATCH] Document wxDataViewListCtrl default sort order Also explain how to change it if the default behaviour of putting all the container items before all the leaves is undesirable. Closes #16105. --- interface/wx/dataview.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index e98ab8a387..ed3a535159 100644 --- a/interface/wx/dataview.h +++ b/interface/wx/dataview.h @@ -3405,6 +3405,13 @@ public: without having to derive any class from it, but it is mostly used from within wxDataViewTreeCtrl. + Notice that by default this class sorts all items with children before the + leaf items. If this behaviour is inappropriate, you need to derive a custom + class from this one and override either its HasDefaultCompare() method to + return false, which would result in items being sorted just in the order in + which they were added, or its Compare() function to compare the items using + some other criterion, e.g. alphabetically. + @library{wxadv} @category{dvc} */