-2
from tkinter import *
import Saque
#Propriedades da Janela Principal
JanMenu = Tk() #JanMenu é uma instância da Classe Tk;
JanMenu['bg'] = 'white' #Cor de Fundo da Janela = Branco
JanMenu.geometry("400x500+500+120")
JanMenu.resizable(width=False , height=False)
JanMenu.overrideredirect(True)
def abrir():
Saque.JanSaque.mainloop();
BtSaque = Button(FrmMenu, image = saque, bd = 0, cursor = 'hand2', bg = 'white',
command = abrir); #Botão saque
BtSaque.grid (row = 3, column = 0, pady = (20, 0), padx = (0, 250));
JanMenu.mainloop()
I have this main window and I want when I click the button BtSaque
open the window to JanSaque
which is a instância
of Tk
that’s in the file Saque.py
, but when I run the program it opens both screens at the same time. Can anyone help me? I just want to open another window after clicking the button. Thank you.
The question is not clear enough. If there is another file besides this one, then there should be no other code sequence than this?
– Caio de Paula Silva
what is in the other file are just the widgets of your screen, what I want is that on this screen I can call this other file (that is a screen) after clicking on btSaque. This code make open another screen after on the button was that I could not do.
– Gabriel Vilarim