Tela_Recepção.py 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. from tkinter import *
  2. from tkinter import messagebox
  3. class Recepcao:
  4. def __init__(self):
  5. self.janela = Tk()
  6. self.janela.title('Recepção')
  7. self.titleStyles = ('Arial', 14)
  8. self.textStyles = ('Roboto', 13)
  9. self.janela.maxsize(1200, 600)
  10. self.janela.minsize(1200, 600)
  11. self.janela.configure(bg='#363636')
  12. self.janela.minsize(width=1200,height=600)
  13. self.janela.iconbitmap('automotivo.ico')
  14. self.LoginCanvas = Canvas(master=self.janela, width = 600, height=370)
  15. self.LoginCanvas.pack(expand=1,fill=BOTH)
  16. self.Back = PhotoImage(master=self.janela, file="recepcao.png")
  17. self.LoginCanvas.create_image(0,0,image=self.Back, anchor=NW)
  18. self.hoverColor1 = '#008000'
  19. self.hoverColor2 = '#1E90FF'
  20. self.hoverColor3 = '#FF0000'
  21. self.botaoCadastrar = Button(self.janela,text="Cadastrar\nCliente",font=('Roboto', 15),width=15,height=3,pady=5,bg="#4682B4",fg="white",relief=RAISED,command=self.cadastrarCliente)
  22. self.LoginCanvas.create_window(900,200,window=self.botaoCadastrar)
  23. self.botaoCadastrar.bind("<Enter>", self.hoverIn1)
  24. self.botaoCadastrar.bind("<Leave>", self.hoverOut)
  25. self.botaoOrcamento = Button(self.janela,text="Ver\nOrçamento",font=('Roboto', 15),width=15,height=3,pady=1,bg="#4682B4",fg="white",relief=RAISED,command=self.verOrcamento)
  26. self.LoginCanvas.create_window(900,330,window=self.botaoOrcamento)
  27. self.botaoOrcamento.bind("<Enter>", self.hoverIn2)
  28. self.botaoOrcamento.bind("<Leave>", self.hoverOut)
  29. self.botaoSair = Button(self.janela,text="SAIR",font=('Roboto', 15),width=7,bg="#4682B4",fg="white",pady=5,relief=RAISED,command=self.saiu)
  30. self.LoginCanvas.create_window(900,500,window=self.botaoSair)
  31. self.botaoSair.bind("<Enter>", self.hoverIn3)
  32. self.botaoSair.bind("<Leave>", self.hoverOut)
  33. self.titulo = Label(self.janela,bg='#363636',fg='white', font=self.titleStyles, text='RECEPÇÃO')
  34. self.titulo.pack(padx=0, pady=10)
  35. mainloop()
  36. def cadastrarCliente(self):
  37. from cadastrarCliente import tela_ver_cadastrar_clientes
  38. return
  39. def hoverIn1(self, event):
  40. event.widget.configure(bg=self.hoverColor1, fg="white",relief=GROOVE)
  41. def hoverIn2(self, event):
  42. event.widget.configure(bg=self.hoverColor2, fg="white",relief=GROOVE)
  43. def hoverIn3(self, event):
  44. event.widget.configure(bg=self.hoverColor3, fg="white",relief=GROOVE)
  45. def hoverOut(self, event):
  46. event.widget.configure(bg='#4682B4',relief=RAISED)
  47. def hoverOut2(self, event):
  48. event.widget.configure(relief=RAISED)
  49. def saiu(self):
  50. self.janela.destroy()
  51. from Tela_Login import Tela_de_Login
  52. return
  53. def verOrcamento(self):
  54. from VerOrcamentoRecep import ver_Orcamento
  55. return
  56. minhaTela = Recepcao()