I have a custom toolbar which I want to remove when the user closes the file. I could do this by adding code to the auto_close event, but the problem is that the user might hit “Cancel”, then the toolbar is gone, but the file is still open. So I thought about simply replacing the “Do you want to close the file” dialog with one that looks exactly the same, but acts slightly different:
– if user clicks “Yes”, then toolbar is removed, file is saved and closed
– if user clicks “No”, then toolbar is removed, and file closed WITHOUT SAVING
– if user clicks “Cancel”, nothing happens
I wrote some code to do this, but the strange thing is that the statement “fileclose pjDoNotSave” seems to be ignored. After clicking “No”, the toolbar is removed, but I still get the standard prompt “Do you want to save the file” (after seeing my my own one). Any ideas what might be wrong with this statement? Thanks!