Tkinter Flashcards
What must you place before everything when writing a program in Tkinter?
root = Tk().
How do you create an input field in Tkinter?
Using Entry().
How can you display a widget on the screen in Tkinter?
Using .pack(), .grid() or .place()
How do you create a label in Tkinter?
Using Label()
How do you create a button in Tkinter?
Using Button()
What must you place at the end of your Tkinter program?
root.mainloop()
What does root.mainloop() in Tkinter do?
It checks where the mouse cursor is.
What function checks where the mouse cursor is in Tkinter?
root.mainloop()
What must every button in Tkinter include?
A command.
How do you get the input of an entry widget in Tkinter?
using .get()
How do you insert text inside of an input box in Tkinter?
Using .insert(0, )
How do you make a Tkinter Label span two columns?
.grid(columnspan = 2)
What does .grid(columnspan = 2) do?
It makes a Tkinter label span two columns.
How do you pass a parameter through a function that is a command of a Tkinter button?
Using lambda: function(parameter)
How do you clear a Tkinter input box?
With .delete(0, END)