/* IupText MASK: Example in C Creates an IupText that accepts only numbers. */ #include #include #include #include int main(int argc, char **argv) { Ihandle *text, *dg; IupOpen(&argc, &argv); text = IupText(""); IupSetAttribute(text, "MASK", "/d*"); IupSetAttribute(text, "SIZE", "100x"); IupSetAttribute(text, "EXPAND", "HORIZONTAL"); dg = IupDialog(text); IupSetAttribute(dg, "TITLE", "IupText MASK"); IupShow(dg); IupMainLoop(); IupClose(); return EXIT_SUCCESS; }