Friday, 15 May 2015

python - python3.4 tkinter.scrolledtext not callable -



python - python3.4 tkinter.scrolledtext not callable -

i write simple code:

from tkinter import * tkinter import ttk import tkinter.scrolledtext root = tk() textpad = tkinter.scrolledtext(root) textpad.pack() root.mainloop()

but not run. output is:

traceback (most recent phone call last): file "e:/m/lale/test/test.py", line 6, in <module> textpad = tkinter.scrolledtext(root) typeerror: 'module' object not callable

you there. need scrolledtext class scrolledtext module. works.

import tkinter tk tkinter.scrolledtext import scrolledtext root = tk.tk() textpad = scrolledtext(root) textpad.pack() root.mainloop()

python python-3.x tkinter

No comments:

Post a Comment