# IupInsert

Definition: | include pGUI.e IupInsert(Ihandle ih, Ihandln ref_child, Ihandle new_child)
Description: | Inserts an interface element before another child of the container. Valid for any element that contains other elements like dialog, frame, hbox, vbox, zbox, menu, etc. ih: Identifier of a container like hbox, vbox, zbox and menu. ref_child: Identifier of the element to be used as reference. Can be NULL to insert as the first element. new_child: Identifier of the element to be inserted before the reference. A fatal error occurs if the interface element could not be inserted.
pwa/p2js: | Not supported. (Just not stumbled into a need for it as yet, probably would not be all that technically difficult.)
Notes: | This function can be used when elements that will compose a container are not known a priori and should be dynamically constructed. The new child can NOT be mapped. It will NOT map the new child into the native system. If the parent is already mapped you must explicitly call IupMap for the appended child. If the actual parent is a layout box (IupVbox, IupHbox or IupZbox) and you try to insert a child that it is already in the parent child list, then the child is moved to the insert position. The elements are NOT immediately repositioned. Call IupRefresh for the container* to update the dialog layout (* or any other element in the dialog).
See Also: | IupAppend, IupDetach, IupHbox, IupVbox, IupZbox, IupMenu, IupMap, IupUnmap, IupRefresh