# IupCreate

Definition: | include pGUI.e Ihandle ih = IupCreate(string classname, Ihandles children={}, string attributes="", dword_seq args={})
Description: | (not officially supported, see Notes) Creates an interface element given its class name and parameters. This function (well, the C function of the same name) is called from all constructors like IupDialog(), IupLabel(), and so on, usually in subtly different but critically important ways. After creation the element still needs to be attached to a container and mapped to the native system so it can be visible. classname: class name of the element to be created children: an optional list of child element handles. For more information on the attributes and args parameters see IupSetAttributes. Note this is not a paranormalised function; you may not omit {} for no children when supplying attributes. Returns: the identifier of the created element, or terminates abruptly if an error occurs.
pwa/p2js: | Not supported.
Notes: | The C functions IupCreatep and IupCreatev are not separately wrapped. The parameters they accept are highly dependent on the classname, and can be a list of (class-and-position-specific) string attributes, a list of Ihandles of children, etc. Only the latter case is supported, via the optional children parameter. In particular there is no way to set a callback of any kind inline during an IupCreate() call, and any IupSetAtt calls are probably best morphed into the single string format as expected by IupSetAttributes. Use of this function is not offically supported: After IupCreate("button") you would (/may) have to perform the class-specific things that IupButton would do automatically, and likewise for all other classes. It is included purely for the purposes of translating code (that actually already works) written in C or some other programming language. A list of known classnames can be found in the documentation for IupGetClassName.
See Also: | IupAppend, IupDetach, IupMap, IupUnmap, IupDestroy, IupGetClassName