1. Richard Donagrandi
  2. PowerBuilder
  3. Friday, 12 January 2024 20:07 PM UTC

I turned on tabbed view on my MDI frame and that all works as expected, until my QA folk pointed out that using the close 'X' on the tab doesn't trigger an event like closing the 'X' on the window. -- So unsaved changes can't be captured when closing the window. 

I noticed you should be able to turn off the contextual menu and the close box on the tab with:

mditbb_1.ShowContextMenu = false
mditbb_1.ShowCloseButton = false

The context menu indeed, was not available, however the close 'X' on the tab is still there.

Since I won't be able to intercept the event, or prevent the event from occurring, I won't be able to enable this feature. 

This is using PB 2022 R2 build 2819.

--- Yes, I know there's the Close event and CloseQuery event, and yes, we already use these to some extent... However, in parts of our application we're also specifically capturing the system event when the user clicks the "x" close box on the window. This generates a pbm_SystemCommand event where commandtype = 61536. Using the 'X' on the tab apparently doesn't trigger this event, so there's nothing to capture. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Monday, 15 January 2024 08:16 AM UTC
  2. PowerBuilder
  3. # 1

Hi Richard,

Thanks for reporting this problem.
Personally, I think this issue is a bug, and we will transfer it to the development department for research and analysis.
In addition, in order to facilitate tracking and management, we suggest that you report your PB issue via our support ticketing system: https://www.appeon.com/standardsupport/newbug

Regards,

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 12 January 2024 20:48 PM UTC
  2. PowerBuilder
  3. # 2

Hi Richard;

  The CloseQuery event always worked for me. I have no idea why anyone would use any other event. The C.Q. event has been the "Main Stay" for capturing work-in-progress not saved since PB v 2.0.

Regards ... Chris

Comment
  1. Richard Donagrandi
  2. Friday, 12 January 2024 21:24 PM UTC
Long story Chris, but in our 30 years of Powerbuilder programming, we've encountered issues with users clicking on that "X" box and still not capturing changes made -- mainly because there's a difference between closing a window, and cancelling changes. Sometimes, cancelling a change requires different logic.



. We have two halves of our application: one that uses a modified pfc, and one that does not. The side that does not, uses closequery extensively, and that MDI frame we can turn tabbed view on. On the side that uses the pfc, clicking on the close box of the window triggers our pfc cancel event...



Regardless, this is all pedantic as the main issue isn't that tabbed view doesn't trigger an event, but that you can't turn off the close box on the tab, as the documentation advertises.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Saturday, 13 January 2024 04:55 AM UTC
Hi Richard;

Yes, setting the following ... mditbb_1.ShowCloseButton = false does NOT work and should be submitted in a Support Ticket. It does not work in PB 2022 R3 either I am sad to say. :-(

Regards .. Chris
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.