Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Importando a biblioteca tkinter
- from tkinter import *
- from functools import partial
- def abre(j):
- if (j==1):
- lbr['text'] = 'Clicou no Primeiro'
- elif(j==2):
- lbr['text'] = 'Clicou no Segundo'
- # Criando a janela principal
- janela = Tk()
- janela.geometry('600x600+150+150')
- janela.state('zoomed')
- janela.title ('DESENVOLVIMENTO DE SISTEMA COMPLETO II')
- # para desabilitar botão state=DISABLED
- # Gerando os botôes
- rotulo =('Primeiro','Segundo','Terceiro','Quarto','Quinto')
- k = 180
- j=0
- for i in rotulo:
- j += 1
- bt = Button(janela, command=(abre(j)), width=20, height=2, anchor='center',font=("Helvetica", 12) , text=(i),bg='#696969', fg='#FFA500')
- bt.place(x=k,y=2)
- k += 200
- lbr = Label(janela,text='Teste dos botões')
- lbr.place(x=200,y=200)
- # Término do sistema.
- janela.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement