菜鸟IT的博客 >> Python
给treeview模块添加纵向滚动条 和 横向滚动条,上下滚动条都加
# ——————↓开始添加纵向滚动轴↓————————————————
vbar=tkinter.Scrollbar(Frame_DisplayExcelData,orient=tkinter.VERTICAL,command=Excel_DataTree.yview)
Excel_DataTree.configure(yscrollcommand=vbar.set)
vbar.place(x=Emmis_ChaJian_Width-12-20+6,y=2,width=20,height=Emmis_ChaJian_Height-215)
# ——————↓开始添加横向滚动轴↓————————————————
hbar=tkinter.Scrollbar(Frame_DisplayExcelData,orient=tkinter.HORIZONTAL,command=Excel_DataTree.xview)
Excel_DataTree.configure(xscrollcommand=hbar.set)
hbar.place(x=2,y=2+Emmis_ChaJian_Height-195,width=Emmis_ChaJian_Width-12-20+6,height=20)
菜鸟IT博客[2022.11.16-16:50] 访问:380