Advertisement
teslariu

mas widgets

Jul 18th, 2023
1,269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.87 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Como hacer este script portable
  5. #
  6. #
  7. # formulario
  8. # posicionamiento place
  9.  
  10. import tkinter as tk
  11. from tkinter import ttk
  12. from tkinter import messagebox
  13.  
  14. def guardar_datos():
  15.     pass
  16.  
  17. ventana = tk.Tk()
  18. ventana.title("Formulario de inscripción")
  19. ventana.config(width=400, height=370)
  20. ventana.resizable(False,False)
  21.  
  22. ###### cuadros de dialogo
  23. # retornan True or False
  24. messagebox.askokcancel(title="INFO", message='Decida')
  25. messagebox.askyesno(title="INFO", message='Decida')
  26. messagebox.askretrycancel(title="INFO", message='Decida')
  27.  
  28. # barra de progreso
  29. barra = ttk.Progressbar(maximum=100)
  30. barra.place(x=10, y=40, width=200)
  31. barra.step(0)
  32. barra.start(20)
  33.  
  34. barra = ttk.Progressbar(orient=tk.VERTICAL, maximum=100)
  35. barra.place(x=250, y=80, height=200)
  36. barra.step(0)
  37. barra.start(20)
  38.  
  39.  
  40. ventana.mainloop()
  41.  
  42.  
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement