Lista de alarmes Tkinter - samur2d2/Python GitHub Wiki

from tkinter import *
from teste2 import Centralizar

root=Tk()
root.title("canvas line")
root.minsize(1080, 640)
Centralizar(root)

topFrame = Frame(root, width=1080, height=90, bg="#2E2E2E")               # 640 - 90 = 530
topFrame.pack()            
navigatorFrame = Frame(root, width=1080, height=25, bg="#ABABAB")       # 550 - 25 = 525
navigatorFrame.pack()    
bodyFrame = Frame(root, width=1080, height=525, bg="#686868")           # 525 - 525 = 0
bodyFrame.pack()         

listbox = Listbox(topFrame, width=150, height=5) 
listbox.place(x=90, y=5) 
scrollbar = Scrollbar(topFrame)

listbox.config(yscrollcommand = scrollbar.set) 
scrollbar.config(command = listbox.yview) 

def alarme(text):
    listbox.insert(0, text)

btn = Button(bodyFrame, text="alarme", command=lambda: alarme("alarme")).place(x=50,y=100)
btn = Button(bodyFrame, text="perigo", command=lambda: alarme("perigo")).place(x=50,y=150)

root.mainloop()
⚠️ **GitHub.com Fallback** ⚠️