Skip to content

Commit 5624768

Browse files
feat Python Tkinter How To Resize Your App With The Sizegrip Widget CPMPLETE
Python Tkinter How To Resize Your App With The Sizegrip Widget COMPLETE resolves: # see also: #
1 parent 6c35b4b commit 5624768

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

Python Tkinter How To Resize Your App With The Sizegrip Widget/HowToResizeYourAppWithTheSizegripWidget.py

+25-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,36 @@
22
# Cómo cambiar el tamaño de su aplicación con el widget de agarre de tamaño
33

44
from tkinter import *
5-
from tkinter import filedialog
6-
from tkinter import font
5+
from tkinter import ttk
76

87
root = Tk()
98
root.title('HowToResizeYourAppWithTheSizegripWidget')
109
root.iconbitmap('Python Tkinter How To Resize Your App With The Sizegrip Widget/icons/document.ico')
11-
root.geometry("1000x660")
10+
root.geometry("400x300")
1211

12+
# Make the app resizeable
13+
root.resizable(True, True)
14+
15+
my_frame2 = Frame(root, highlightbackground="gray", highlightthickness=1)
16+
my_frame2.pack(pady=20)
17+
18+
my_label = Label(my_frame2, text="Hello World!",
19+
font=("Helvetica", 32))
20+
my_label.pack(pady=20, padx=20)
21+
22+
# Reconfigure our rows and olumns for grid
23+
#root.columnconfigure(0, weight=1)
24+
#root.rowconfigure(0, weight=1)
25+
26+
# Create a frame
27+
my_frame = Frame(root, highlightbackground="gray", highlightthickness=1)
28+
my_frame.pack(side="bottom", fill=X)
29+
30+
# Create sizegrip
31+
my_sizegrip = ttk.Sizegrip(root)
32+
my_sizegrip.pack(side="right", anchor=SE)
33+
34+
#my_sizegrip.grid(row=1, sticky=SE)
1335

1436

1537
root.mainloop()

0 commit comments

Comments
 (0)