#include <CtrlLib/CtrlLib.h> using namespace Upp; class Test : public TopWindow { ArrayCtrl array; public: typedef Test CLASSNAME; void ColorPusherFactory(int i, One<Ctrl>& ctrl) { ColorPusher& cp = ctrl.Create<ColorPusher>(); } void DropListFactory(int i, One<Ctrl>& ctrl) { DropList& dl = ctrl.Create<DropList>(); for(int i = 0; i < 4; i++) dl.Add(i, i); dl.SetIndex(0); } Test() { SetRect(0, 0, 640, 480); CenterScreen(); Add(array.SizePos()); array.AddColumn("DropLists").Ctrls(THISFN(DropListFactory)); array.AddColumn("ColorPushers").Ctrls(THISFN(ColorPusherFactory)); for(int i = 0; i < 10; i++) array.Add(); } }; GUI_APP_MAIN { Test().Run(); }