Closed undeadindustries closed 6 years ago
I tried that before I posted here. It doesn't seem to think Veto is part of "e" ...
If you copy and my paste that code into a quick app, to see if it does it for you?
Wish I could post an image of it here.
Thank you!
This is what I'm going off. That, and the official wx
docs list .Veto()
as the function to use on wxCloseEvent
.
If you could put together a small repository demonstrating your issue, I'll check it out when I wake up. At least then I'll be able to see the error codes.
I think firstly, you should convert the event to CloseEvent
:
closeEvent := wx.ToCloseEvent(e)
CloseEvent
has a method named Veto
:
closeEvent.Veto()
dontpanic92, that worked!
However, when I have something bound to my close event, the window doesn't close. I'll update this soon if I don't sort it out. If not, I'll close this. Thank you!
I forgot to add Destroy() at the end. all set. Thanks again!!
How would I set veto in a Bind?
Thanks!