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++ Widgets - General questions or Mixed problems » Howto add dynamic ctrls to topwindow
Howto add dynamic ctrls to topwindow [message #10295] Sat, 30 June 2007 13:42 Go to next message
h3l1 is currently offline  h3l1
Messages: 28
Registered: August 2006
Location: Innsbruck, Austria
Promising Member
Hi there,

just looked at the manual how to add a ctrl. I want to add ctrl's dynamically at runtime, depending on config file.

In the manual it says every widget has to be a member variable.
But I create the ctrl's with new, do I have to delete them or
will they be deleted automatically by the destructor of the topwindow.

Just trying to avoid memoryleaks Cool

Thanks and bye
Heli
Re: Howto add dynamic ctrls to topwindow [message #10296 is a reply to message #10295] Sat, 30 June 2007 15:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Array<SomeCtrlClass> (e.g. Array<Label>).

Or, if class is runtime info too, Array<Ctrl>.

Of course, this is just the basic principle, you can use any composition you want/need (ArrayMap, Array<SomeStructContaintWidget> etc...)

See:

http://www.ultimatepp.org/reference$DynamicDlg.html
Re: Howto add dynamic ctrls to topwindow [message #10322 is a reply to message #10296] Mon, 02 July 2007 09:38 Go to previous message
h3l1 is currently offline  h3l1
Messages: 28
Registered: August 2006
Location: Innsbruck, Austria
Promising Member
Cool,

thanks. Sorry I didn't see the example.

Bye
Heli
Previous Topic: does exist a HtmlToColor?
Next Topic: what's the key identifier for ^Enter?
Goto Forum:
  


Current Time: Thu May 02 06:58:32 CEST 2024

Total time taken to generate the page: 0.02773 seconds