I have 2 windows. GUI and Information
I want to make a button on GUI that opens up the window Information, but I don't know how to do that.
I tried to use the TopLevel widget but I don't know how to implement it correctly.
This is the code for GUI
from tkinter import *
from automata.fa.dfa import DFA
from DFA import arranca
def btn_clicked():
print("Button Clicked")
def submit():
canvas.itemconfig(Canv, text="\t"+arranca(entry1.get()))
window = Tk()
window.geometry("880x550")
window.configure(bg = "#ffffff")
canvas = Canvas(
window,
bg = "#ffffff",
height = 550,
width = 880,
bd = 0,
highlightthickness = 0,
relief = "ridge")
canvas.place(x = 0, y = 0)
This the code for Information
from tkinter import *
window = Tk()
window.title("Information")
window.geometry("700x400")
window.configure(bg = "#ffffff")
canvas = Canvas(
window,
bg = "#ffffff",
height = 400,
width = 700,
bd = 0,
highlightthickness = 0,
relief = "ridge")
canvas.place(x = 0, y = 0)
background_img = PhotoImage(file = f"background_1.png")
background = canvas.create_image(
350.0, 188.0,
image=background_img)
window.resizable(False, False)
window.mainloop()