Changing a Variablestring in a Class in Python
问题 I have a small piece of code, which was working fine, until I decided to create a class and put things into that class. Now my problem is, I cannot change stringvariable anymore. Here is my code: import tkinter as tk import tkinter.ttk as ttk class MainApplication(tk.Frame): def __init__(self, parent, *args, **kwargs): tk.Frame.__init__(self, parent, *args, **kwargs) self.parent = parent frame1 = ttk.LabelFrame(root, text="PANEL A", borderwidth=5) frame1.grid(row=0, column=0, padx=5, pady=5)