Python >> Tutoriel Python >  >> Python GUI >> Tkinter GUI

Exemple de widget Python 3 Tkinter Sizegrip pour créer une application de bureau Windows redimensionnable de manière dynamique

Exemple de widget Python 3 Tkinter Sizegrip pour créer une application de bureau Windows redimensionnable de manière dynamique

import tkinter as tk
from tkinter import ttk
 
root = tk.Tk()
root.title('Sizegrip Demo')
root.geometry('300x200')
root.resizable(True, True)
 
# grid layout
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
 
# create the sizegrip
sg = ttk.Sizegrip(root)
sg.grid(row=1, sticky=tk.SE)
 
 
root.mainloop()