Chinaunix

标题: ttk.Treeview为什么左边要多出一列 [打印本页]

作者: angel725    时间: 2019-03-04 20:02
标题: ttk.Treeview为什么左边要多出一列
  1.     tv = ttk.Treeview(win,)
  2.     tv["columns"] = ('a','b','c')
  3.     tv.grid(row=4,columnspan=4)
  4.     vbar = ttk.Scrollbar(win, command=tv.yview)
  5.     vbar.grid(row=4,column=4)
  6.     tv.configure(yscrollcommand=vbar.set)

  7.     tv.column('a', width=50)
  8.     tv.column('b',width=100)
  9.     tv.column('c',width=100)
  10.     tv.heading('a',text='编号')
  11.     tv.heading('b',text='说明')
  12.     tv.heading('c',text='地址')
复制代码


编号左边为什么要多出一列?不该有啊。
另外右边的滚动条,怎么让它和treeview一样高呢?








欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2