|
|
Home » U++ Library support » TabCtrl » TabCtrl CancelClose No longer work (as intended) (Some recent changes (could be as old as a few years) has broken its intention)
TabCtrl CancelClose No longer work (as intended) [message #55999] |
Sun, 10 January 2021 19:54  |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
I recently find that because TabCtrl::Paint calls TabCtrl::PaintTab which in turn calls IsCancelClose() etc, resulting in CancelClose gate being called at unintended times, CancelClose can no longer be use to accept user input to possibly cancel an unintended close action.
To see an example, just try to compile and run Bazzar/FileTabsExample, check the circled item and move your mouse a little bit.

A few years back, I actually make use of this gate(CancelClose) to do some useful work. I am sad it's no longer working for unknown reason.
Can @mirek or @klugier possibly take some time to look into it?
Thank you!
-
Attachment: a.png
(Size: 19.23KB, Downloaded 708 times)
[Updated on: Sun, 10 January 2021 20:05] Report message to a moderator
|
|
|
|
|
|
|
|
Re: TabCtrl CancelClose No longer work (as intended) [message #58090 is a reply to message #56081] |
Sat, 12 February 2022 17:13   |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi Mirek,
I stumbled over the changes in TabBar (I'm using it in my UppCad) and I've seen that the bug exists also in CancelCloseSome Gate, which doesn't work anymore as intended, and it's useless like it is now.
I guess it should be possible to add a "ConfirmCloseSome" gate, as for ConfirmClose, and remove the CancelCloseSome one.
The usage should be like ConfirmClose, but taking a number of tabs and not a single one.
Ciao
Massimo
EDIT: I wanted to fix it by myself, but I see that there's a complete mixing of old and new behaviour, with mistakes in many places.
Fixing it will be difficult... by now I'll take the old TabBar code from around 2016, which worked well.
[Updated on: Sat, 12 February 2022 17:38] Report message to a moderator
|
|
|
Re: TabCtrl CancelClose No longer work (as intended) [message #58190 is a reply to message #58090] |
Fri, 18 March 2022 11:54   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
mdelfede wrote on Sat, 12 February 2022 17:13Hi Mirek,
I stumbled over the changes in TabBar (I'm using it in my UppCad) and I've seen that the bug exists also in CancelCloseSome Gate, which doesn't work anymore as intended, and it's useless like it is now.
I guess it should be possible to add a "ConfirmCloseSome" gate, as for ConfirmClose, and remove the CancelCloseSome one.
The usage should be like ConfirmClose, but taking a number of tabs and not a single one.
Ciao
Massimo
EDIT: I wanted to fix it by myself, but I see that there's a complete mixing of old and new behaviour, with mistakes in many places.
Fixing it will be difficult... by now I'll take the old TabBar code from around 2016, which worked well.
Well, frankly, maintaining TabBar is a punishment for me... That said, I believe current behaviout is that
"CancelClose*" basically enables/disables cancel action and therefore should not contain any Prompts or anything. It is e.g. used for enabling/disabling close button.
"ConfirmClose" is called immediately before actually removing the tab and therefore can do Prompt.
Is this inline with your expectations?
Then the purpose of "ConfirmCloseAll" should be to e.g. prompt the operation for the whole group, right?
|
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 07:54:09 CEST 2025
Total time taken to generate the page: 0.00953 seconds
|
|
|