What exactly is the difference between starting the program with
from tkinter import *
and
from tkinter import tix as tk
Because with the latter one I'm having problems, hence the question. I've changed all tkinter elements from plain 'Button' to 'tk.Button', but that doesn't seem to be the only difference that it makes.
Particularly I have a problem in the following code bit:
class OptionMenus(OptionMenu):
def __init__(self, master, status, *fonts):
self.var = StringVar(master)
self.var.set(status)
OptionMenu.__init__(self, master, self.var, *fonts,
command = update_config)
self.config(width = "9", height = "1")
or
class OptionMenus(tk.OptionMenu):
def __init__(self, master, status, *fonts):
self.var = tk.StringVar(master)
(self.var).set(status)
(tk.OptionMenu).__init__(self, master, self.var, *fonts,
command = update_config)
self.config(width = "9", height = "1")
(and just in case how I call it)
fonts_menu = OptionMenus(buttons, strings[17], *fonts)
The latter one produces an error: "TypeError: init() takes from 2 to 3 positional arguments but 4 were given." The first one works just fine.