WorksheetsWeek 6 - CustomTkinter Quiz
Total questions: 15
Worksheet time: 8mins
What does the mainloop() function do?
Closes the GUI
Creates buttons
Starts the GUI event loop
Sets the title
What method is used to set the size of the window?
set_size()
geometry()
resize()
dimensions()
What parameter is used to assign an action to a CTkButton?
set_event
on_click
command
bind
What is the correct syntax to change label text dynamically?
label.update()
label.config()
label.configure(text="new")
label.change("new")
What is the purpose of pack() in CustomTkinter?
Create padding
Arrange widgets in a window
Import widgets
Close the app
What does pady=10 do?
Adds horizontal space
Adds vertical padding
Creates a margin
Sets text position
What is the purpose of CTkFrame?
Store data
Display a message
Group and organize widgets
Create an image
Which of these makes the frame expand to fill space?
pack(fill="none")
expand=True
geometry()
corner_radius=0
What is corner_radius used for?
Font styling
Button sizing
Roundness of corners
Border color
Which property is used to add space outside a widget horizontally?
pady
padx
marginx
offsetx
What is the purpose of fill="both"?
Fills only width
Fills only height
Fills both width and height
Fills with color
What does textbox.insert("0.0", "Hello") do?
Inserts at the end
Replaces all content
Inserts at the beginning
Deletes content
How do you make a textbox read-only?
textbox.readonly()
textbox.configure(state="disabled")
textbox.lock()
textbox.freeze()
What is required to use CTkImage?
tkinter.image
PIL.Image
opencv
pngreader
Which method resizes an image in PIL?
resize()
stretch()
scale()
zoom()
