Advertisement
teslariu

tkinter_grid

Sep 15th, 2023
930
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. import tkinter as tk
  5. from tkinter import ttk
  6.  
  7.  
  8.  
  9.  
  10. ventana = tk.Tk()
  11. ventana.title("Posicionamiento grid")
  12. ventana.config()
  13.  
  14. caja = ttk.Entry()
  15. caja.grid(row=1, column=1, columnspan=2, sticky="wsen", padx=70, pady=100)
  16.  
  17.  
  18. boton = ttk.Button(text="HOLA")
  19. boton.grid(row=2, column=2)
  20.  
  21.  
  22. boton2 = ttk.Button(text="OTRO BOTON")
  23. boton2.grid(row=3, column=1, rowspan=2)
  24.  
  25.  
  26. boton3 = ttk.Button(text="JAJA")
  27. boton3.grid(row=4, column=4)
  28.  
  29.  
  30. ventana.rowconfigure(1, weight=1)
  31. ventana.columnconfigure(1, weight=1)
  32. ventana.mainloop()
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement