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 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 Go to next message
Lance is currently offline  Lance
Messages: 373
Registered: March 2007
Senior Member
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.

index.php?t=getfile&id=6334&private=0

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 87 times)

[Updated on: Sun, 10 January 2021 20:05]

Report message to a moderator

Re: TabCtrl CancelClose No longer work (as intended) [message #56000 is a reply to message #55999] Sun, 10 January 2021 19:56 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 373
Registered: March 2007
Senior Member
In a reply to this post back in 2016

https://www.ultimatepp.org/forums/index.php?t=msg&th=966 7&start=0&

I and cbpporter were able to make it work. Will no longer.

[Updated on: Sun, 10 January 2021 20:00]

Report message to a moderator

Re: TabCtrl CancelClose No longer work (as intended) [message #56001 is a reply to message #56000] Sun, 10 January 2021 21:51 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 830
Registered: September 2012
Location: Poland, Kraków
Experienced Contributor
Hello Lance,

I can confirm that the bug exists. What worries me is that TabBar::IsCancelClose() method that triggers CancelClose button is triggered from some strange places like MouseMove Embarassed

This functionality is important even if it is not directly used by tools like TheIDE. This is some straightforward option that should work.

I will do not have much time to fix it. Maybe Mirek would try. If you have any clues or some propositions We would be grateful for. In the long-term TabBar should find the new maintainer that will fix bugs and add new functionality.

Klugier


Ultimate++ - one framework to rule them all.
Re: TabCtrl CancelClose No longer work (as intended) [message #56002 is a reply to message #56001] Mon, 11 January 2021 00:43 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 373
Registered: March 2007
Senior Member
Thank you for the quick feedback. It appears that code for TabBar has been modified since some time in or after 2016 to allow the tab cross not to be drawn if the page should not be closed. The change satisfy intended use case (a search for uppsrc actually shows 0 ocurrence of CancelClose), but will exclude other legitimate use like in my case. The code seems to be quite complicated to touch.
Re: TabCtrl CancelClose No longer work (as intended) [message #56081 is a reply to message #56002] Fri, 22 January 2021 13:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13055
Registered: November 2005
Ultimate Member
Well, these are 2 different concepts. I have resolved the issue by adding ConfirmClose and ConfirmCloseAll Gates, as shown in refurbished reference/FileTabsExample.
Re: TabCtrl CancelClose No longer work (as intended) [message #56088 is a reply to message #56081] Fri, 22 January 2021 22:53 Go to previous message
Lance is currently offline  Lance
Messages: 373
Registered: March 2007
Senior Member
Thank you, Mirek!
Previous Topic: TabCtrl related question
Goto Forum:
  


Current Time: Wed Jan 27 18:32:49 CET 2021

Total time taken to generate the page: 0.01627 seconds