Does anyone have a way to interrupt a tabStrip change from happening?
I have a tabstrip with Navigation Mode = Disabled.
When the user clicks another tab, I want to prompt the user to save their data before the tab change takes place.
I’ve tried using a propertyChange script:
if event.propertyName == 'selectedTab': userResponse = system.gui.confirm('Do you want to save your edits before leaving "%s"'%event.oldValue, 'Save?', False) if userResponse: # save data OR prevent the tab from changing so user can decide... else: pass # allow the tab to change
The tab change takes place before the message is displayed.
I’ve also messed around with mousePressed and mouseClicked but I can’t find a way to prompt the user before the tab change has already completed.
TIA for suggestions.