Enviado em 12/07/2018 - 02:16h
Boa noite pessoal.class App():
"""."""
def __init__(self):
"""."""
self.root = tk.Tk()
self.root.title('Bloco de Notas')
self.root.columnconfigure(0, weight=1) # coluna 0 expansível peso=1
self.root.rowconfigure(0, weight=0)
self.string = []
self.lb = ttk.Label(self.root, wraplength=win_width,
text='Primeira Nota')
self.lb.grid(pady=4, row=0, column=0, columnspan=2, sticky='W'+'E')
self.ent = tk.Entry(self.root)
self.ent.grid(pady=5, row=1, column=0, sticky='W'+'E')
self.BT1 = ttk.Button(self.root,
text='Gravar', command=self.incluir)
self.BT1.grid(pady=5, row=1, column=1)
self.root.mainloop()
def incluir(self):
"""."""
conteudo = (self.ent.get())
self.lb['text'] = conteudo
print('conteudo =', conteudo)
self.BT1.grid_forget()
self.ent.grid_forget()
self.string.append(conteudo)
print('string =', self.string)
comp = (len(self.string))
print('comp = ', comp)
self.ent = tk.Entry(self.root)
self.ent.grid(pady=5, row=comp-1, column=0,
columnspan=2, sticky='W'+'E')
self.lb = ttk.Label(self.root, wraplength=win_width,
text=self.string[comp-1])
self.lb.grid(pady=4, row=comp,
column=0, columnspan=2, sticky='E'+'W')
self.BT1.grid(pady=5, row=comp, column=3)
App()
Conciliando o uso da ZRAM e SWAP em disco na sua máquina
Servidor de Backup com Ubuntu Server 24.04 LTS, RAID e Duplicati (Dell PowerEdge T420)
Visualizar câmeras IP ONVIF no Linux sem necessidade de instalar aplicativos
Proteja seu Linux Mint com o Timeshift: Restaure o sistema mesmo que ele não inicie!
Instalando Google Chrome no Debian 13
paginação dos favoritos não funciona no vivaolinux[BU... (7)
Erro de interface de Rede no Virt Manager dentro Debian 13 KDE (11)