#include "CtrlLib/CtrlLib.h" using namespace Upp; #define LAYOUTFILE #include GUI_APP_MAIN { WithMyAppLayout dlg; CtrlLayout(dlg, "C++11 demo"); dlg.list.NoHeader().AddColumn(); Vector x = { 1, 2, 12, 34, 15, 11 }; for(auto i : x) dlg.list.Add(i); dlg.add << [&] { if(dlg.list.Find(~dlg.number) < 0) dlg.list.Add(~dlg.number); }; dlg.list.WhenSel << [&] { dlg.number <<= dlg.list.GetKey(); }; dlg.Execute(); }