【发布时间】:2014-12-17 11:05:57
【问题描述】:
我正在使用 python Tkinter 设计一个 gui。我尝试将我的代码包装在类中。我为每一帧使用不同的类。代码或多或少是这样的。
Class GetEntry():
"""This class will acquire the text in entry widget"""
Class Frame1():
"""Consist of all entry widget"""
Class Frame2():
"""Consist of all button widget"""
Class Main_App()
"""All classes are called here"""
但是,当单击类 Frame2 中的一个按钮以获取位于类 Frame1 中的条目小部件中的文本时,我想调用 GetEntry 类。有什么建议吗?
提前致谢。
【问题讨论】:
标签: python class tkinter widget