python3.4 tkinter滚动文本不可调用

2024-06-07 17:31:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我写了这么简单的代码:

from tkinter import *
from tkinter import ttk
import tkinter.scrolledtext

root = Tk()
textPad = tkinter.scrolledtext(root)
textPad.pack()
root.mainloop()

但不是跑。输出为:

Traceback (most recent call last):
  File "E:/m/lale/test/test.py", line 6, in <module>
    textPad = tkinter.scrolledtext(root)
TypeError: 'module' object is not callable

Tags: 代码fromtestimportmosttkinterrootpack

热门问题