Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Remove all children from TopWindow/ParentCtrl
Re: Remove all children from TopWindow/ParentCtrl [message #60057 is a reply to message #60056] Mon, 24 July 2023 22:10 Go to previous messageGo to previous message
devilsclaw is currently offline  devilsclaw
Messages: 74
Registered: August 2022
Member
I also tried this, It seems to remove everything but the code to add it back in does not seem to work.

void RemoveRecursivce(Upp::Ctrl *ctrl) {
  if(ctrl == NULL) {
    return;
  }
  while(ctrl->GetChildCount()) {
    Upp::Ctrl *tctrl = ctrl->GetIndexChild(ctrl->GetChildCount() - 1);
    if(tctrl->GetChildCount()) {
      RemoveRecursivce(tctrl);
    } else {
      ctrl->RemoveChild(tctrl);
    }
  }
}
 
Read Message
Read Message
Read Message
Previous Topic: plugin/FT_fontsys, plugin/DroidFonts
Next Topic: StringUnZip example needed
Goto Forum:
  


Current Time: Thu Aug 21 18:33:44 CEST 2025

Total time taken to generate the page: 0.05338 seconds