Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import messagebox,ttk
- import tkinter as tk
- window=tk.Tk()
- window.geometry("500x500")
- label=tk.Label(window)
- label["text"]="Anzahl an Kanalpunkten"
- entry=tk.Entry(window,bd=5)
- label.pack()
- entry.pack()
- window.update()
- Luny={
- "Nachricht hervorheben":100,
- "Trinken": 200,
- "Snackies": 300,
- "Haltung annehmen" : 300,
- "Zufälliges Abo-Emote": 600,
- "Confetti": 1.200,
- "Bonk": 2.00,
- "RATATATATATA": 3.000,
- "Pat the Luny": 4.000,
- "Gangster-Luny": 6.600,
- "Scrubbies": 7.000,
- "Who let the Woo out": 9.000,
- "Kartenflex": 100.000,
- "The Woo Plush": 1.000000,
- }
- if entry==0:
- entry.set()=="0"
- Auswahl=ttk.Combobox(
- state="readonly",
- values=["Luny","Laphi","Jinja","Mona","Finstey"]
- )
- Auswahl2=ttk.Combobox()
- state="readonly"
- if Auswahl.get()=="Luny":
- for key,value in Luny.items():
- values=[str(Luny.key +":"+ Luny.value)]
- def display():
- selection=Auswahl.get()
- messagebox.showinfo(
- message=f"Deine Anzahl an Kanalpunkten bei {selection} ist gleich: {entry.get()}",
- title="Selection"
- )
- window.update()
- Auswahl.place(x=180, y=100)
- Auswahl2.place(x=180,y=170)
- button = ttk.Button(text="Display selection", command=display)
- button.place(x=180, y=250)
- window.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement