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 » TopWindow&PopUp, TrayIcon » How to delete all widgets on a TopWindow?
How to delete all widgets on a TopWindow? [message #9653] Wed, 23 May 2007 22:04 Go to next message
michael is currently offline  michael
Messages: 153
Registered: May 2007
Location: Germany
Experienced Member
I open a new TopWindow from my main Topwindow. What's the right way to clear all widgets on that new window when closing it?

Michael
Re: How to delete all widgets on a TopWindow? [message #9665 is a reply to message #9653] Thu, 24 May 2007 11:41 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Unless you have allocated memory directly with 'new' you don't have to do anything. Simply close or delete the window.
Re: How to delete all widgets on a TopWindow? [message #9685 is a reply to message #9665] Thu, 24 May 2007 23:52 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
...would like to add that the cornerstone of U++ programming style is to avoid 'new' for widgets (unless there is no other way of course).

Usually, your widgets are somewhat bound to some stack frame or class, therefor destructors take care about the removing/releasing resources.
Previous Topic: How to add Topwindow icon?
Next Topic: How to handle child windows
Goto Forum:
  


Current Time: Fri Mar 29 15:28:58 CET 2024

Total time taken to generate the page: 0.01714 seconds