Code: Alles auswählen
from tkinter import *
def zweitesFenster():
def Test_läuft():
B1["bg"] = "#00FF00"
neuerTitel = Tk()
neuerTitel.title("Prüfplatz Laetus")
root = neuerTitel
lab0 = Label(root,text = "Bitte DUT montieren und anschließen")
lab0["font"] = "Arial 20"
lab0["height"] = 5
lab0["width"] = 30
B3 = Button(root,text = "Okay")
B3["bd"] = 3
B3["width"] = 15
B3["height"] = 2
B3["font"] = "Arial 15"
lab0.pack(side=TOP)
B3.pack(side=TOP)
def Abbruch():
B1["bg"] = "#FF0000"
return
#newWindow = Toplevel(root)
neuerTitel=Tk()
neuerTitel.title("Prüfplatz Laetus")
root = neuerTitel
textfenster=Text(root)
textfenster["width"] = 50
textfenster["bd"] = 3
B1 = Button(root, text="Test starten", command=Test_läuft)
B1["bd"] = 3
B1["width"] = 15
B2 = Button(root, text="Abbrechen", command=Abbruch)
B2["bd"] = 3
B2["width"] = 15
textfenster.grid(row=12,column=0,columnspan=5,sticky="s")
B1.grid(row=1, column=1, sticky="sw")
B2.grid(row=2, column=1, sticky="sw")
lab2 = Label(root, text=" Initialisierung")
lab2["font"] = "Arial 16 "
lab2.grid(row=0, column=0, sticky="w")
lab3 = Label(root, text="Log")
lab3["font"] = "Arial 12 italic"
lab3.grid(row=10, column=0, sticky="w")
x = IntVar()
x.set(0)
RB0 = Radiobutton(root, text="smartspect", variable=x,value=1)
RB1 = Radiobutton(root, text="iCam", variable=x,value=2)
RB0.grid(row=1, column=0, sticky="w")
RB1.grid(row=2, column=0, sticky="w")
#---Hauptprogramm-----
neuerTitel = Tk()
neuerTitel.title("Prüfplatz Laetus")
root = neuerTitel
B0 = Button(root,text="Prüfprogramm starten",command=zweitesFenster)
B0["font"] = "Arial 15"
B0["bd"]=3
B0["width"]=30
B0["height"]=2
img1 = PhotoImage(file ="C:/Users/wolf_m/Pictures/Hund.PNG")
img2 = PhotoImage(file ="C:/Users/wolf_m/Pictures/Laetus.PNG")
lab4 = Label(root,image = img1)
lab5 = Label(root,image =img2)
B0.pack(side=TOP)
lab4.pack(side=LEFT)
lab5.pack(side=RIGHT)
root.mainloop()