GithubHelp home page GithubHelp logo

Comments (6)

dontpanic92 avatar dontpanic92 commented on August 30, 2024 2

I think firstly, you should convert the event to CloseEvent:

closeEvent := wx.ToCloseEvent(e)

CloseEvent has a method named Veto:

closeEvent.Veto()

from wxgo.

Asday avatar Asday commented on August 30, 2024

I believe you're after .Veto(), defined here.

from wxgo.

undeadindustries avatar undeadindustries commented on August 30, 2024

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!

from wxgo.

Asday avatar Asday commented on August 30, 2024

screenshot_20180817-205443

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.

from wxgo.

undeadindustries avatar undeadindustries commented on August 30, 2024

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!

from wxgo.

undeadindustries avatar undeadindustries commented on August 30, 2024

I forgot to add Destroy() at the end. all set. Thanks again!!

from wxgo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.