IupGetNextChild
Returns the children of the given control.
Parameters/Return
Ihandle *IupGetNextChild(Ihandle *parent, Ihandle *lastchild); [in C] IupGetNextChild(parent, lastchild: iuplua_tag) -> ret: iuplua_tag [in IupLua3] iup.GetNextChild(parent, lastchild: iuplua_tag) -> ret: iuplua_tag [in IupLua5]parent: Identifier of an interface control. lastchild: Identifier of the last interface control returned by the function.
Note
This function will return the children of the control in the exact same order in which they were assigned. To get the first child use
lastchild=NULL
.
Example
/* Lists all children of a IupVbox */#include <stdio.h> #include "iup.h" int main() { Ihandle *dialog, *bt, *lb, *vbox, *tmp = NULL; IupOpen(); bt = IupButton("Button", ""); lb = IupLabel("Label"); vbox = IupVbox(bt, lb, NULL); dialog = IupDialog(vbox); IupShow(dialog); while(1) { tmp = IupGetNextChild(vbox, tmp); if(tmp) printf("vbox has a child of type %s\n", IupGetType(tmp)); else break; } IupMainLoop(); IupClose(); return 0; }