mod09 - TKinter Flashcards

1
Q

List types of command line user interfaces.

A

Powershell, cmd, bash, korn, borne, c, telnet, OSGeo4Wshell, ftp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

List types of graphical user interfaces.

A

ArcPro, QGIS, FME, pgModeler, VScode, LibreOffice, Android apps, iOS apps, ArcGIS Online, pgAdmin4, proxmox

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

List Python GUI solutions.

A

Tkinter, wxWidgets, QT, Kivy, GTK+

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

List TKinter widgets.

A

button, checkbox, entry, frame, label, labelframe, spinbox, panedwindow, scale, scrollbar, progressbar, sizegrip, treeview, radiobutton, menubutton, combobox, separator, notebook, listbox, canvas, text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the top level widget of TKinter?

A

Tk - The GUI part of TCL/TK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does Tk.mainloop() do?

A

Launches the GUI and takes over the thread.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you stop the GUI using TKinter?

A

tk.destroy()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 4 components of an event paradigm?

A

1) Event Loop
2) Events
3) Event Handler
4) Registration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a binding var?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

List binding variables used in TKinter.

A

StringVar(), IntVar(), DoubleVar(), BooleanVar()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a frame widget?

A

A container that can hold other widgets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the difference between the text widget and entry widget?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is hooking early in a TKinter event?

A

The command property of the widget = callback function. Event is left mouse button single click (LMBSC).
«button-1» release

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is hooking late in a TKinter event?

A

The bind method is used AFTER the widget has been created.
widget.bind(“«name of the event»”, callback function)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is <Button-2>?</Button-2>

A

middle mouse buttton (left+right)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is <Button-4>?</Button-4>

A

scroll up

17
Q

What is <Button-5>?</Button-5>

A

scroll down

18
Q

What is pack()?

A

Geometry manager that organizes widgets in horizontal or vertical boxes which are limited to left, right, top, or bottom.

19
Q

What is grid()?

A

Geometry manager that organizes widgets in a table-like structure. Row/Column concept. Sticky: N, S, E, W, NE, NW, SE, SW

20
Q

What is place()?

A

Geometry manager that allows you to place a widget at it’s absolute position.

21
Q

What are 3 “No decision” messagebox variants?

A

messagebox.showinfo()
messagebox.showerror()
messagebox.showwarning()

22
Q

What are 4 “Decision (True or False return)” message box variants?

A

answer = messagebox.askokcancel
answer = messagebox.askretrycancel
answer = messagebox.askyesno
answer = messagebox.askyesnocancel