Greetings,
Testing is on Ubuntu 16.04 and RPi Stretch (built wxPython-4.0.7.post2 fom scratch)
wxPython Overview/Window Layout/Sized Controls
Sized Controls Form Dialog - window close control doesn’t close the demo window. Ok/Cancel does.
Sized Controls Form Dialog with scrolled panel - same as above
Sized Controls Error Dialog - Not possible to close the demo window using any button/control
Sized Controls Grid Layout Demo - Works as expected
Sized Controls Static Box Demo - Works as expected
It works for me on all platforms I test on. My guess is that this may be yet another deficiency in the default Window Manager on RPis. The WM will typically send a message to the application when the close button is clicked, and for wx.Dialogs wxWidgets turns that into an EVT_BUTTON event as if the Cancel button had been clicked. But if the WM for some reason decides to not send it then it would behave as you describe. Does the Dialog sample in the demo behave the same?
You may want to look through any relevant settings available in the WM’s configuration, or try a different one.
Some of us do and some of us don’t. Robin is known to at least use a Mac lol.
Besides that most in the community can try to provide an answer to most questions…