Difference between working with tkinter and tix (as tkinter?) Difference between working with tkinter and tix (as tkinter?) tkinter tkinter

Difference between working with tkinter and tix (as tkinter?)


tix and tk are two separate modules. They have some widgets that have similar names, but they are not interchangeable libraries.

If you want to use tix, you should import it separately from tkinter, and you should not do global imports because it leads to ambiguity, which is likely why you're having problems.

Import them like this:

import tkinter as tkfrom tkinter import tix

Then, use the widgets like this:

tk.Button(...)tix.OptionMenu(...)

It then becomes crystal clear which widgets come from which libraries.