��������: SetItemExpand ��������: void ������Ϣ: bool _Expanded ������Ϣ: CTreeNodeUI * _TreeNode ����˵��:
| 1131 | // ����˵��: |
| 1132 | //************************************ |
| 1133 | void CTreeViewUI::SetItemExpand( bool _Expanded,CTreeNodeUI* _TreeNode /*= NULL*/ ) |
| 1134 | { |
| 1135 | if(_TreeNode) |
| 1136 | { |
| 1137 | if(_TreeNode->GetCountChild() > 0) |
| 1138 | { |
| 1139 | int nCount = _TreeNode->GetCountChild(); |
| 1140 | for(int nIndex = 0;nIndex < nCount;nIndex++) |
| 1141 | { |
| 1142 | CTreeNodeUI* pItem = _TreeNode->GetChildNode(nIndex); |
| 1143 | pItem->SetVisible(_Expanded); |
| 1144 | |
| 1145 | if(pItem->GetCountChild() && !pItem->GetFolderButton()->IsSelected()) |
| 1146 | SetItemExpand(_Expanded,pItem); |
| 1147 | } |
| 1148 | } |
| 1149 | } |
| 1150 | else |
| 1151 | { |
| 1152 | int nIndex = 0; |
| 1153 | int nCount = GetCount(); |
| 1154 | while(nIndex < nCount) |
| 1155 | { |
| 1156 | CTreeNodeUI* pItem = (CTreeNodeUI*)GetItemAt(nIndex); |
| 1157 | |
| 1158 | pItem->SetVisible(_Expanded); |
| 1159 | |
| 1160 | if(pItem->GetCountChild() && !pItem->GetFolderButton()->IsSelected()) |
| 1161 | SetItemExpand(_Expanded,pItem); |
| 1162 | |
| 1163 | nIndex++; |
| 1164 | } |
| 1165 | } |
| 1166 | } |
| 1167 | |
| 1168 | //************************************ |
| 1169 | // ��������: SetVisibleFolderBtn |
nothing calls this directly
no test coverage detected