07-06-2022, 12:29 PM
Hola Francisco. Estoy muy bien, te dejo mi nuevo código para que
me digas si el botón también debería agrandarse/achicarse o sus
dimensiones siempre son estáticas.-
Otra cosita, tenía noción de columnconfigure(), rowconfigure() pero
creí que con ponerlo en el Frame bastaba, ¿tengo que poner los 2
métodos por cada fila/columna que cree?
Que tengan todos un bello bello martes.
Slds. Daniel ☕☕☕
me digas si el botón también debería agrandarse/achicarse o sus
dimensiones siempre son estáticas.-
Otra cosita, tenía noción de columnconfigure(), rowconfigure() pero
creí que con ponerlo en el Frame bastaba, ¿tengo que poner los 2
métodos por cada fila/columna que cree?
Código:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import tkinter as tk
from tkinter import ttk, font
def main():
root = tk.Tk()
root.title("Marco")
root.geometry("+500+300")
cuadro = tk.Frame(root, width=480, height=320, bd=5, relief="sunken")
cuadro.grid(row=0, column=0, sticky="nsew")
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
botonUno = ttk.Button(cuadro, text="Buscar")
botonDos = ttk.Button(cuadro, text="Cerrar")
botonUno.grid(row=0, column=0, ipady=10)
botonDos.grid(row=0, column=1, ipady=10)
cuadro.columnconfigure(0, weight=1)
cuadro.rowconfigure(0, weight=1)
cuadro.columnconfigure(1, weight=1)
root.mainloop()
if __name__ == '__main__':
main()
Que tengan todos un bello bello martes.
Slds. Daniel ☕☕☕
abraza las cosas y personas malas como si fueran tu mas preciada joya,Son tus mas grandes maestros de paciencia sabiduría y amor y cuando lo abrazas dejan de causar dolor.-