Cannot close a dialog on Linux with wx.WS_EX_VALIDATE_RECURSIVELY

Hi Robin,

[Robin]: Do any of the widgets in the dialog have a validator that is
failing?

My dialog has only one direct child, a notebook, and all the controls are
the children of tabs in this notebook. Some controls use validators to
validate and transfer data to/from.

If I set wx.WS_EX_VALIDATE_RECURSIVELY to the dialog, no validators fail,
everything works OK except I cannot close the dialog with the (X) button on
Linux. I have to close the dialog by the Cancel button.

It seems that every time I set wx.WS_EX_VALIDATE_RECURSIVELY to the dialog,
I cannot close it on Linux regardless of whether this dialog has children
controls with validators or not.

Please advice. Thanks for your help!

···

-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Wednesday, February 27, 2008 4:07 AM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Cannot close a dialog on Linux with
wx.WS_EX_VALIDATE_RECURSIVELY

Tai Tran Tan wrote:

Hi all,

I'm using Python 2.4.4 and wxPython 2.6.3.3.

On Red Hat Linux AS 4, every time I set the
wx.WS_EX_VALIDATE_RECURSIVELY window style to a dialog, I cannot close
the dialog with the (X) button at the top right (I don't know exactly
how this button is called). I recognized that the EVT_CLOSE event of
dialog was not triggered.

Do any of the widgets in the dialog have a validator that is failing?

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Tai Tran Tan wrote:

Hi Robin,

[Robin]: Do any of the widgets in the dialog have a validator that is
failing?

My dialog has only one direct child, a notebook, and all the controls are
the children of tabs in this notebook. Some controls use validators to
validate and transfer data to/from.

If I set wx.WS_EX_VALIDATE_RECURSIVELY to the dialog, no validators fail,
everything works OK except I cannot close the dialog with the (X) button on
Linux. I have to close the dialog by the Cancel button.

It seems that every time I set wx.WS_EX_VALIDATE_RECURSIVELY to the dialog,
I cannot close it on Linux regardless of whether this dialog has children
controls with validators or not.

How are you setting the style? Are you doing anything that would clear the default wx.CLOSE_BOX style?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hi Robin,

im currently experiencing the same problem. Once im setting the wx.WS_EX_VALIDATE_RECURSIVELY style, i can no longer close the dialog with the X.

Dialog.__init__(self, parent, "EmployeeDetail", "DialogTitle",
                        style=wx.RESIZE_BORDER | wx.DEFAULT_DIALOG_STYLE)
        self.SetExtraStyle(wx.WS_EX_VALIDATE_RECURSIVELY)

Do you have any advice on how to get the X Button to work again?

Thanks for your help.