The Combobox widget

import tkinter as tk
from tkinter import ttk

parent = tk.Tk()
my_string_var = tk.StringVar()

combobox = ttk.Combobox(
    parent,
    textvariable=my_string_var,
    values=["Option 1", "Option 2", "Option 3"]
)
combobox.pack()
parent.mainloop()

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading