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 » TabCtrl.WhenSet is called when app closes
Re: TabCtrl.WhenSet is called when app closes [message #60496 is a reply to message #60483] Sun, 10 March 2024 22:01 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3435
Registered: August 2008
Senior Veteran
Hi Victor

I am surprised. I have reduced your sample to the minimum, but I cannot answer why TabCtrl::WhenSet() is called when the window is closed.
I would be grateful if someone could lend a hand.

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct Test: TopWindow {
	TabCtrl tabs;
	StaticRect tab0, tab1;
	Test() {
		Add(tabs.SizePos());
		tabs.Add(tab0.SizePos(), "Tab 0");
		tabs.Add(tab1.SizePos(), "Tab 1");
		tabs.WhenSet = [&] {PromptOK(Format("Tab %d set", tabs.Get()));};
	}
};

GUI_APP_MAIN {
	Test().Run();
}


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Previous Topic: tabctrl contents not visible
Next Topic: TabCtrl CancelClose No longer work (as intended)
Goto Forum:
  


Current Time: Tue May 13 23:31:51 CEST 2025

Total time taken to generate the page: 0.02326 seconds