我有一个Label,它的textvariable是StringVar,最初设置为0。{按cd1>按钮后,按cd1>更新信息。首先让我展示一下代码:#dictionary module contains some custom functions
#to be used later
from dictionary import *
import os
import pickle
from tkinter import *
#file_path is what will be the text
#for the entry box
file_path = ''
#SampleApp allows for frames to be stacked on top of each other
class SampleApp(Tk):
def __init__(self, *args, **kwargs):
Tk.__init__(self, *args, **kwargs)
container = Frame(self)
container.pack(side="top", fill="both", expand=True)
container.grid_rowconfigure(0, weight=1)
container.grid_columnconfigure(0, weight=1)
self.frames = {}
for F in (StartPage, ProcessPage, ReviewPage):
frame = F(container, self)