Public void
setCheckbox()
{
TreeItemIdx
treeItemIdxOU,treeItemIdxChild;
FormTreeItem
formTreeItem,selectedTreeItem;
Map en = new Map(Types::Integer,Types::Int64) ;
MapEnumerator me;
int childcount=1;
ImageRes stateImage;
ListEnumerator listEnumrOU, listEnumr;
imageListAppl_checkbox = new
ImageListAppl_checkbox();
treeItemIdxOU = ResourceGroupTree.getChild(ResourceGroupTree.getRoot());
en.insert(childcount,treeItemIdxOU);
while (treeItemIdxOU)
{
if(ResourceGroupTree.getNextSibling(treeItemIdxOU))
{
childcount++;
treeItemIdxOU = ResourceGroupTree.getNextSibling(treeItemIdxOU);
en.insert(childcount, treeItemIdxOU);
}
else
{
break;
}
}
me =
en.getEnumerator();
while(me.moveNext())
{
if(ResourceGroupTree.getChild(me.currentValue()))
{
treeItemIdxChild = ResourceGroupTree.getChild(me.currentValue());
ResourceGroupTree.setStateImagelist(imageListAppl_checkbox.imageList());
formTreeItem = ResourceGroupTree.getItem(treeItemIdxChild);
stateImage = imageListAppl_checkbox.image(#ImageCheckNone);
formTreeItem.stateImage(stateImage);
ResourceGroupTree.setItem(formTreeItem);
}
while(treeItemIdxChild)
{
if(ResourceGroupTree.getNextSibling(treeItemIdxChild))
{
treeItemIdxChild = ResourceGroupTree.getNextSibling(treeItemIdxChild);
ResourceGroupTree.setStateImagelist(imageListAppl_checkbox.imageList());
formTreeItem = ResourceGroupTree.getItem(treeItemIdxChild);
stateImage = imageListAppl_checkbox.image(#ImageCheckNone);
formTreeItem.stateImage(stateImage);
ResourceGroupTree.setItem(formTreeItem);
}
else
{
break;
}
}
// me.moveNext();
}
}
No comments:
Post a Comment