[Python] How to create a modal dialog in tkinter?

Discussão em 'Python' iniciado por Stack, Setembro 5, 2025.

  1. Stack

    Stack Membro Participativo

    I have a MFC application which runs some embedded Python scripts. I am trying to make one of the dialogs this embedded script creates modal, but I am not having much success.

    Can anyone point me the way to make a modal dialog? Do I need to use a windows functions for this or only Tk or Python functions are enough?

    For what I googled looks like the following combination of functions should do the magic, but they dont seem to work the way I was expecting:

    focus_set()

    grab_set()

    transient(parent)

    Continue reading...

Compartilhe esta Página