ultimatepp/bazaar/ValueCtrlTest/main.cpp
kohait 0d0c55b1d5 bazaar: ValueCtrl: fix Action invoke on OK, fix 'not showing data at begin', example data
git-svn-id: svn://ultimatepp.org/upp/trunk@2995 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2011-01-13 10:36:25 +00:00

30 lines
522 B
C++

#include "ValueCtrlTest.h"
ValueCtrlTest::ValueCtrlTest()
{
CtrlLayout(*this, "Window title");
clear <<= THISBACK(Clear);
Value v = ValueArray(Vector<Value>() << "123.8" << "Test");
vc.SetData(v);
vc <<= THISBACK(ActionCB);
Add(vc.HSizePos().BottomPos(0, 20));
}
void ValueCtrlTest::ActionCB()
{
Value v = vc.GetData();
String s = "# Value Type: ";
s << v.GetType() << "\n\t";
s << "data: ";
s << AsString(v);
ToInfo(s);
RLOG(s);
}
GUI_APP_MAIN
{
ValueCtrlTest().Run();
}