According to the docs there should be a ComboBox operation in TK, but I can't find it. dir(tk) shows
['ACTIVE', 'ALL', 'ANCHOR', 'ARC', 'At', 'AtEnd', 'AtInsert', 'AtSelFirst', 'AtSelLast', 'BASELINE', 'BEVEL', 'BOTH', 'BOTTOM', 'BROWSE', 'BUTT', 'BaseWidget', 'BitmapImage', 'BooleanType', 'BooleanVar', 'BufferType', 'BuiltinFunctionType', 'BuiltinMethodType', 'Button', 'CASCADE', 'CENTER', 'CHAR', 'CHECKBUTTON', 'CHORD', 'COMMAND', 'CURRENT', 'CallWrapper', 'Canvas', 'Checkbutton', 'ClassType', 'CodeType', 'ComplexType', 'DISABLED', ...
The version is
import Tkinter as tk
tk.__version__
'$Revision: 81008 $'
on my Mac (latest OS X 10.11.6). No brewery for python whatsoever.
There is no ComboBox widget in tkinter, what you are looking for is tkinter.ttk (in Python 3, in Python 2 it's just called ttk), which provides themed tk widgets. Docs for tkinter.ttk, and subsection for ComboBox.
You can use this code to import ttk and use its widgets rather than standard tkinter ones (note the different capitalization between 2 and 3!):
Python 2
from Tkinter import *
from ttk import *
Python 3:
from tkinter import *
from tkinter.ttk import *
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With