window window.GetChild()
Applicable Classes: All
Return Type: window
Parameters: none
Description:
GetChild returns the first child window of the calling window. If this
window has no child, this function returns a null window. To retrieve
other child windows, use the GetPrevSibling
and GetNextSibling functions.
Example
Code |
use
"PhantomTarget.dec";
System("PhantomTarget.exe");
# Bring up a controls box
PhantomTarget._Controls.Combo_Box.Select();
int ChildCount = 0;
# Get first child
window Child = Combo.GetChild();
# While the child is not a null window
while(Child){
ChildCount++;
# Display information about the child
disp("Tag: " + Child.Tag + "; Class:
" + Child.Class);
# If the child has children, say so
if(Child.GetChild()){
disp(" --> Has Children");
}
# Get the child's next sibling
Child = Child.GetNextSibling();
}
disp("Window has " + string(ChildCount) + " direct
children");
# Exit out
Combo.OK.Click();
PhantomTarget.Close();
|
See Also: GetParent,
GetNextSibling, GetPrevSibling