# IupGetNextChild

Definition: | include pGUI.e Ihandln res = IupGetNextChild(Ihandln ih, Ihandln child)
Description: | Returns the next child of the specified control given its brother. ih: identifier of the interface element. Can be NULL if child not NULL. child: Identifier of the child brother to be used as a reference. To get the first child use NULL. Returns: the handle of the child or NULL.
pwa/p2js: | Not supported. (Just not yet stumbled into a need for it.)
Notes: | This function will return the children of the control in the exact same order in which they were assigned. If child is not NULL then it returns exactly the same result as IupGetBrother(), at least that is when the bPrev parameter of the latter is the default false, and there is no such way to make the IupGetNextChild() function yield the previous child.
Example: |
    include pGUI.e

    IupOpen(`demo\pGUI\`)

    Ihandle vbox = IupVbox({IupButton("Button"),
                            IupLabel("Label")})

    Ihandle dialog = IupDialog(vbox,`TITLE="IupGetNextChild demo", SIZE=250x50`)
    IupShow(dialog)

    Ihandln child = IupGetNextChild(vbox, NULL)

    while child!=NULL do
        printf(1,"vbox has a child of type %s\n", IupGetClassName(child))
        child = IupGetNextChild(NULL, child)
    end while

    if platform()!=JS then
        IupMainLoop()
        IupClose()
    end if
The output is:
    vbox has a child of type button
    vbox has a child of type label
See Also: | IupGetBrother, IupGetParent, IupGetChild