
#include <CtrlLib/CtrlLib.h>
#include <GridCtrl/GridCtrl.h>

using namespace Upp;

class test_gc : public TopWindow {
	GridCtrl gc;
	FrameTop<Option> op;

public:
	typedef test_gc CLASSNAME;
	test_gc();
	void init();
};

void test_gc::init()
{
	gc.Reset();
	if(~op)
	{
		gc.AddColumn("1").Fixed(50);
		gc.AddColumn("2").Fixed(50);
		gc.AddColumn("3");
		gc.AddColumn("4");
		gc.AddColumn("5").Fixed(50);
	} else
	{
		gc.AddColumn("o1").Fixed(50);
		gc.AddColumn("o2");
		gc.AddColumn("o3").Fixed(60);
		
	}
		
		
		
}


test_gc::test_gc()
{
	op.Height(50);
	op.WhenAction=THISBACK(init);
	gc.AddFrame(op);
	Add(gc.SizePos());
	init();
	
}

GUI_APP_MAIN
{
	test_gc().Run();
}
