为什么老是报错说元组索引超出范围呢
开始的时候就没有问题 后来就报错了
m = MultiListbox(listbox)
m['background']='#F0FFFF'
m['width']=960
m['height']=450
m.place(x=20,y=130)
m.config(columns=(u'设备类', u'设备名', u'地址',u'温度',u'湿度',u'压力',u'日期'),expandcolumns=(0,1,2,3,4,5))
m.focus_set()
m.insert('end','dh','Bar','blah')
[解决办法]
表格有7列,insert只给了4个值。
insert(self, index, *args)
Similar to Tkinter.Listbox.insert(), except that instead of one
string a number of strings equal to the number of columns must be given
as arguments. It is an error to specify more or fewer arguments than
the number of columns. Returns the ID of the newly created item, as
returned by item_create().