![]( )
#include <nana/gui.hpp>
int main()
{
using namespace nana;
fm.show();
i18n.
set(
"NANA_BUTTON_OK", u8
"确定");
i18n.set("NANA_BUTTON_CANCEL", u8"取消");
fm.events().click([&fm]
{
inputbox inbox(fm,
"Please input <bold>your personal information</>.",
"Personal information");
inbox.
image(img,
true, { 380, 0, 40, 100 });
inbox.
image(img,
false, { 420, 0, 40, 100 });
inbox.
image_v(img,
true, { 0, 0, 380, 50 });
inbox.
image_v(img,
false, { 0, 50, 380, 50 });
{
{
msgbox mb(handle,
"Invalid input");
mb << "Name should not be empty, Please input your name.";
return false;
}
return true;
});
if(inbox.
show(name, gender, birth, height, kids))
{
auto g = gender.value();
auto b = birth.value();
auto year = birth.year();
auto month = birth.month();
auto day = birth.day();
}
});
}