지정한 아이템이 자식 아이템 갯수를 리턴하는 API이다.
Parameters | Type | Description |
---|---|---|
strKey | STRING | 트리 아이템 키값 |
bAllChild | BOOL | [옵션] 모든 자식 아이템 갯수 여부 (기본값: true) |
Type | Description |
---|---|
long | 자식 아이템 갯수 |
bAllChild 파라미터가 fale인 경우, 한단계 자식 아이템 갯수를 리턴한다.
lItem 파라미터가 유효하지 않은 경우, -1이 리턴된다.
function btn_on_mouseup()
{
// 키값을 가지는 아이템 추가
trTest.insertitemex("addtree", "treekey", 0, 1, "", "");
// "treekey" 키값의 아이템을 부모로 하는 아이템 추가
trTest.insertitemex("subnode1", "subnode1key", 1, 1, "treekey", "");
var nChildItemCount = trTest.getchilditemcountex("treekey");
if(nChildItemCount > 0){
screen.alert("자식 아이템이 있습니다.");
}
}