Hi Stefan,
It is a bug, sorry for the inconvenience. Now, you can hide graphs/layouts in a folder, and then loop over all the folders in project. Please refer to the example below.
void showHideWindow() {
Folder rootFld = Project.RootFolder; // get the root folder
loopAllFolders(rootFld);
}
// this function is used to hide all the graphs and layouts in the specified
// folder, including subfolders, recursively
void loopAllFolders(Folder fld) {
if(!fld)
return;
fld.Activate(); // activate the folder
// hide graph and layout
foreach(PageBase pb in fld.Pages) {
int iType = pb.GetType();
if(iType == EXIST_GRAPH || iType == EXIST_LAYOUT) {
pb.Show = false;
}
}
// subfolders recursion
foreach(Folder subFld in fld.Subfolders) {
loopAllFolders(subFld);
}
}
Penn