mod09 - TKinter Flashcards
List types of command line user interfaces.
Powershell, cmd, bash, korn, borne, c, telnet, OSGeo4Wshell, ftp
List types of graphical user interfaces.
ArcPro, QGIS, FME, pgModeler, VScode, LibreOffice, Android apps, iOS apps, ArcGIS Online, pgAdmin4, proxmox
List Python GUI solutions.
Tkinter, wxWidgets, QT, Kivy, GTK+
List TKinter widgets.
button, checkbox, entry, frame, label, labelframe, spinbox, panedwindow, scale, scrollbar, progressbar, sizegrip, treeview, radiobutton, menubutton, combobox, separator, notebook, listbox, canvas, text
What is the top level widget of TKinter?
Tk - The GUI part of TCL/TK
What does Tk.mainloop() do?
Launches the GUI and takes over the thread.
How do you stop the GUI using TKinter?
tk.destroy()
What are the 4 components of an event paradigm?
1) Event Loop
2) Events
3) Event Handler
4) Registration
What is a binding var?
The association between a variable name and its value. The value is stored elsewhere (in a control) and the binding variable can access this value.
List binding variables used in TKinter.
StringVar(), IntVar(), DoubleVar(), BooleanVar()
What is a frame widget?
A container that can hold other widgets.
What is the difference between the text widget and entry widget?
The entry widget allows a user to enter a single-line of text, whereas the text widget allows a user to enter multiple-lines of text.
What is hooking early in a TKinter event?
The command property of the widget = callback function. Event is left mouse button single click (LMBSC).
«button-1» release
What is hooking late in a TKinter event?
The bind method is used AFTER the widget has been created.
widget.bind(“«name of the event»”, callback function)
What is <Button-2>?</Button-2>
middle mouse buttton (left+right)
What is <Button-4>?</Button-4>
scroll up
What is <Button-5>?</Button-5>
scroll down
What is pack()?
Geometry manager that organizes widgets in horizontal or vertical boxes which are limited to left, right, top, or bottom.
What is grid()?
Geometry manager that organizes widgets in a table-like structure. Row/Column concept. Sticky: N, S, E, W, NE, NW, SE, SW
What is place()?
Geometry manager that allows you to place a widget at it’s absolute position.
What are 3 “No decision” messagebox variants?
messagebox.showinfo()
messagebox.showerror()
messagebox.showwarning()
What are 4 “Decision (True or False return)” message box variants?
answer = messagebox.askokcancel
answer = messagebox.askretrycancel
answer = messagebox.askyesno
answer = messagebox.askyesnocancel