Advertisement
teslariu

pack tkinter

Sep 21st, 2022
910
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # pack.py
  5.  
  6. import tkinter as tk
  7. from tkinter import ttk
  8.  
  9. ventana = tk.Tk()
  10. ventana.title("Pack")
  11. ventana.config(width=400, height=600)
  12.  
  13. caja_nombre = ttk.Entry()
  14. caja_nombre.pack(expand=True, fill=tk.BOTH)
  15.  
  16.  
  17.  
  18. etiqueta = ttk.Label(text="Nombre")
  19. etiqueta.pack(after=caja_nombre, expand=True, padx=150, pady=100)
  20.  
  21.  
  22.  
  23.  
  24. boton = ttk.Button(text="Guardar")
  25. boton.pack(before=etiqueta, side=tk.BOTTOM, expand=True, ipadx=100, ipady=75, pady=50, padx=50)
  26.  
  27.  
  28.    
  29.    
  30. ventana.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement