wx.Frame MakeModal

Hy.
I have two applications. I run second one from fist and I need to achieve
ShowModal() functionality from dialog on frame. I would use dialog and I have
changed most of my code to use dialogs whenever this is neaded but some parts
need wx.MenuBar witch can't be added to Dialog. "object has no attribute
'SetMenuBar' ".

Tried frm.MakeModal(True) but it doesn't stop execution of main frame!

Help please!

Tnx!

SMALLp wrote:

Hy. I have two applications. I run second one from fist and I need to achieve
ShowModal() functionality from dialog on frame. I would use dialog and I have
changed most of my code to use dialogs whenever this is neaded but some parts
need wx.MenuBar witch can't be added to Dialog. "object has no attribute
'SetMenuBar' ".

Tried frm.MakeModal(True) but it doesn't stop execution of main frame!

Right, it doesn't block execution in a nested event loop like ShowModal does, but it does prevent other top level windows in the same application from getting user input events or activated, etc. It's really not that hard to deal with the difference in code execution. Just write the code as if the frame were not modal, then add calls to MakeModal(True) and MakeModal(False) to the right places.

ยทยทยท

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