Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 17, 2021 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/e6c1a0001fba09188de8f0bb2b6256db to your computer and use it in GitHub Desktop.
Save parzibyte/e6c1a0001fba09188de8f0bb2b6256db to your computer and use it in GitHub Desktop.
import tkinter as tk
def imprimir_informacion(r):
altura = r.winfo_reqheight()
anchura = r.winfo_reqwidth()
altura_pantalla = r.winfo_screenheight()
anchura_pantalla = r.winfo_screenwidth()
print(f"Altura: {altura}\nAnchura: {anchura}\nAltura de pantalla: {altura_pantalla}\nAnchura de pantalla: {anchura_pantalla}")
raiz = tk.Tk()
raiz.etiqueta = tk.Label(
raiz, text="Hola Tkinter!\nProgramando en Python\nparzibyte.me"*5)
raiz.etiqueta.pack(side="top")
app = tk.Frame()
app.pack()
raiz.update()
imprimir_informacion(raiz)
app.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment