|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
# -*- coding:utf-8 -*-
import tkinter
from boto import config
from matplotlib import scale
def resize(ev=None):
label = config(font='Helvetica -%d bold' % scale.get())
top = tkinter.Tk()
top.geometry('250x150')
label = tkinter.Label(top, text='Hello world!', font='Helvetica -12 bold')
label.pack(fill=tkinter.Y, expand=1)
scale = tkinter.Scale(top, from_=10, to=40, orient=tkinter.HORIZONTAL, command=resize)
scale.set(12)
scale.pack(fill=tkinter.X, expand=1)
quit = tkinter.Button(top, text='QUIT', command=top.quit, activeforeground='white', activebackground='red')
quit.pack()
tkinter.mainloop()
这个是错误提示
C:\ProgramData\Anaconda3\python.exe C:/Users/abc/PycharmProjects/untitled3/1111.py
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\tkinter\__init__.py", line 1699, in __call__
return self.func(*args)
File "C:/Users/abc/PycharmProjects/untitled3/1111.py", line 9, in resize
label = config(font='Helvetica -%d bold' % scale.get())
TypeError: 'Config' object is not callable |
|