How to apply MakeModal() method on frame with child dialog

Hello,
I have my files structure as follow (see attached):-

frame.py = this file contains two classes for frame and dialog (MyFrame1 and MyDialog1 respectively)

main.py = this file import the classes above and also contains two sub-classes based on the above (MyFrame2 and MyDialog2 respectively).

Now keeping the file structure as it is above, how do I make the Frame window inactive when the dialog window is opened?

How can the MakeModal() method be properly applied on the file arrangement/structure above? All the examples I found so far make uses of two frames instead of a frame and a dialog.

wxPython Classic on Python 27

Thanks

frame.py (1.52 KB)

main.py (432 Bytes)

File structure doesn’t have anything to do with it. If you have a
class derived from wx.Dialog, then if you do
dlg.ShowModal()
that dialog will be shown modally.

···

Umar Yusuf wrote:

I have my files structure as follow (see attached):-

frame.py = this file contains two classes for frame
and dialog (MyFrame1 and MyDialog1 respectively)

main.py = this file import the classes above and
also contains two sub-classes based on the above (MyFrame2 and
MyDialog2 respectively).

      Now keeping the file structure as it is above, how do I

make the Frame window inactive when the dialog window is
opened?

      How can the MakeModal() method be properly applied on the

file arrangement/structure above? All the examples I found so
far make uses of two frames instead of a frame and a dialog.

-- Tim Roberts, Providenza & Boekelheide, Inc.

timr@probo.com

Fantastic, that was the method I was looking for. Thanks @Tim

···

On Mon, Feb 6, 2017 at 11:29 AM, Tim Roberts timr@probo.com wrote:

Umar Yusuf wrote:

I have my files structure as follow (see attached):-

frame.py = this file contains two classes for frame
and dialog (MyFrame1 and MyDialog1 respectively)

main.py = this file import the classes above and
also contains two sub-classes based on the above (MyFrame2 and
MyDialog2 respectively).

      Now keeping the file structure as it is above, how do I

make the Frame window inactive when the dialog window is
opened?

      How can the MakeModal() method be properly applied on the

file arrangement/structure above? All the examples I found so
far make uses of two frames instead of a frame and a dialog.

-- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
File structure doesn't have anything to do with it.  If you have a

class derived from wx.Dialog, then if you do

    dlg.ShowModal()

that dialog will be shown modally.

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


*Wouldn’t you rather do Business with us? *
This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately and delete the
original. Any use of the email by you is prohibited. If you have received
this communication in error, please notify the author by replying to this
e-mail immediately.


www.BintaSMS.com <http://www.bintasms.com/>
www.BintaComputers.net <http://www.bintacomputers.net/>