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 » TabCtrl » How to use TabBar CancelClose/WhenClose?
Re: How to use TabBar CancelClose/WhenClose? [message #46512 is a reply to message #46510] Wed, 18 May 2016 15:51 Go to previous messageGo to previous message
Lance is currently offline  Lance
Messages: 527
Registered: March 2007
Contributor
You method with GetCurrentCtrl, pointers and memory management is a bit not U++ enough for me.


Sad

A few years ago, I proposed to add a bit in Ctrl to allow a child Ctrl to be owned, which was rejected by Mirek. Then I found he used PtrBit or something like that (pointer as int, add 1 to signal an owned ctrl) in his ArrayCtrl to allow a child to be owned. If a Ctrl can be owned, we can rely on TabCtrl to delete it when needed, which will save some code and some 'ugly' delete. Otherwise it's an inevitable choice, unless you want to put up with the extra cost of an redundant Array just to hold the new'd Ctrls.

Anyway, it's a matter of taste/faith. Good thing is you make things work as you wish and the way you wish.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Coloring tab
Next Topic: How to plot image in one tab based on TabCtrl
Goto Forum:
  


Current Time: Sun May 12 15:34:57 CEST 2024

Total time taken to generate the page: 0.02678 seconds