From: Matt M. <mat...@ya...> - 2006-11-30 05:00:01
|
I've been playing around with making windows modal (not just dialogs, but anything) via the MakeModal method (check out wx.core_). I've got it set up so that during the child's on_initialize, self.MakeModal(true) is called, preventing the user from going back to the parent. I have a 'Close' button on the child window, with the handler on_btnClose_command(self, event). Inside the handler is the call self.MakeModal(False), followed by self.close(), so that the parent is usable again once the child is destroyed. But, what if the user doesn't close the window with my Close button? What if he closes with the Close icon in the top right corner? I've tried this, and the parent isn't usable (which makes me think the child isn't really being destroyed). Is there a way to attach some function to that event called by clicking the icon? And, somewhat unrelated, is there a list somewhere of event types for different widgets (there's select for listbox, and mouseClick and command for buttons and some others)? Or maybe a better question would be, what exactly is inside 'event'? Thanks ya'll! --------------------------------- Want to start your own business? Learn how on Yahoo! Small Business. |