Home » U++ Library support » TabCtrl » TabCtrl.WhenSet is called when app closes
Re: TabCtrl.WhenSet is called when app closes [message #60497 is a reply to message #60496] |
Mon, 11 March 2024 08:45  |
 |
koldo
Messages: 3437 Registered: August 2008
|
Senior Veteran |
|
|
Hi Victor
As I didn't understand what was going on, I looked at what I had done in my programmes. The trick is to add the RejectBreak() as indicated in your Close():
virtual void Close() {
RejectBreak(IDOK);
TopWindow::Close();
}
I always do this, to prevent a blank field (an EditInt for example) from blocking the program from closing.
To Mirek: The problem with the program is that in TopWindow::Close(), Ctrl::InLoop() returns true, and then, TopWindow::DefaultBreak() calls AcceptBreak(IDOK). THis calls TopWindow::Accept() of all children. And as TabCtrl::Accept() calls the Set() of all children, the WhenSet is activated...
Best regards
IƱaki
|
|
|
Goto Forum:
Current Time: Sat Jul 05 23:57:10 CEST 2025
Total time taken to generate the page: 0.05089 seconds
|