ultimatepp/bazaar/ValueCtrlTest/main.cpp
kohait 28982960b5 fixing some of my Bazaar things, work in progress
git-svn-id: svn://ultimatepp.org/upp/trunk@14139 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2020-03-08 20:37:30 +00:00

31 lines
555 B
C++

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