you need to use prefix tk
when you write:
so therefore anywhere tkinter would normally be needed, you use tk instead.
if you import thusly:
def Option_SelectionEvent(event): print("do it") optionList = ("Server1","Server2","Server3") s = tk.StringVar() s.set("a") self.om = tk.OptionMenu(master, s, *optionList, command=Option_SelectionEvent)it all depends on how you import the package
when you write:
import tkinter as tkyour saying import package tkinter, and for my program name tkinter tk
so therefore anywhere tkinter would normally be needed, you use tk instead.
if you import thusly:
from tkinter import *no prefix is needed, so:
s = StringVar()works.