ultimatepp/upptst/DropGridTst/main.cpp
cxl 2f294d966b upptst: DropGridTst
git-svn-id: svn://ultimatepp.org/upp/trunk@1172 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-05-14 06:37:41 +00:00

51 lines
1 KiB
C++

#include <CtrlLib/CtrlLib.h>
#include <GridCtrl/GridCtrl.h>
#include <DropGrid/DropGrid.h>
using namespace Upp;
struct App : public TopWindow
{
DropGrid drop;
App()
{
Sizeable().Zoomable();
SetRect(Size(600, 100));
Title("DropGrid");
drop.ClearButton();
drop.AddPlus(THISBACK(Action));
Add(drop.LeftPosZ(20, 350).TopPosZ(20, 19));
drop.AddColumn("ID");
drop.AddColumn("Value");
drop.AddColumn("Description");
drop.AddText("Add person", THISBACK(Action));
drop.AddText("Add client", THISBACK(Action)).Left().SetImage(GridImg::Append());
drop.AddSelect(THISBACK(Action)).Left();
for(int i = 0; i < 20; i++)
drop.Add(i, Format("Hello %d", i), Format("How are you mr Hello %d", i));
drop.Width(300);
drop.DisplayAll(0);/*NoHeader(0)*///NotNull();
drop.ColorRows();
drop.SetDropLines(15);
drop.SetValueColumn(1);
drop.AddValueColumn(0).AddValueColumn(1);
}
void Action()
{
}
typedef App CLASSNAME;
};
GUI_APP_MAIN
{
App().Run();
}