May 2018
Beginner to intermediate
452 pages
11h 26m
English
The ttk.Combobox argument is an Entry widget that adds a drop-down select menu. To populate the drop-down menu, simply pass in a values argument with a list of the strings, which the user can select.
You can execute the following code to create a Combobox widget:
combobox = ttk.Combobox(
parent, textvariable=my_string_var,
values=["Option 1", "Option 2", "Option 3"])
The preceding code will generate the following widget:
