mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
reference: ArrayCtrlSorting temporarily removed
git-svn-id: svn://ultimatepp.org/upp/trunk@10803 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
449cf99359
commit
71b46a07c5
3 changed files with 1 additions and 38 deletions
|
|
@ -1,11 +0,0 @@
|
|||
description "Sorting ArrayCtrl by column clicks\377";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
ArrayCtrl list;
|
||||
|
||||
list.AddColumn("Column1").Sorting(); // default sorting
|
||||
list.AddColumn("Column2") // we provide compare function that sorts based on string length
|
||||
.Sorting([](const Value& a, const Value& b) -> int {
|
||||
return SgnCompare(AsString(a).GetCount(), AsString(b).GetCount());
|
||||
});
|
||||
|
||||
list.Add("Not sorted");
|
||||
|
||||
for(int i = 0; i < 100; i++)
|
||||
list.Add((int)Random(), (int)Random(), (int)Random());
|
||||
|
||||
list.SortingFrom(1);
|
||||
|
||||
TopWindow win;
|
||||
win.Add(list.SizePos());
|
||||
|
||||
win.Run();
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ private:
|
|||
INTERLOCKED { LOG("Request rejected " << n); }
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_WIN32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue