- Richard Donagrandi
- PowerBuilder
- Friday, 12 January 2024 08: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.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.