WorksheetsDay 27 CustomTkinter - 1st July
Total questions: 10
Worksheet time: 5mins
What is the primary purpose of CTkTextbox in CustomTkinter?
Single-line input
Display images
Multi-line text input and display
Dropdown selection
Which method is used to retrieve the text content from a CTkTextbox?
.fetch()
.get()
.read()
.input()
What does textbox.get("0.0", "end") do?
Deletes all the content
Inserts a new line
Retrieves all text from the beginning to the end
Makes the textbox editable
What will happen if you set state="disabled" on a CTkTextbox?
It clears the text
User cannot edit the textbox
It resizes the textbox
It hides the textbox
Which of the following is used to clear all content in CTkTextbox?
textbox.clear("all")
textbox.remove()
textbox.delete("0.0", "end")
textbox.purge()
What does corner_radius=15 do in the textbox widget?
Sets corner color
Adds padding
Rounds the corners of the textbox
Adds border width
Which parameter changes the outline color of the CTkTextbox?
corner_radius
fg_color
text_color
border_color
Which function is used in the code to insert a new line using a button?
print_text()
insert_line()
add_line()
new_text()
What is the output of .get("0.0", "end") if the textbox is empty?
Error
None
An empty string with a newline (\n)
"Empty"
What is the purpose of textbox.configure(state="normal") in the code?
To change textbox size
To update appearance
To allow the textbox to be edited
To delete the textbox
