在我的Python程序中,我倾向于将所有与文本相关的内容都使用标签进行处理。在为大约50个引用编写了一个非常长的标签后,现在我卡在了一个需要滚动条的多行标签的toplevel窗口上,而标签不会滚动。
我已经在窗口上放置了滚动条,但它无法滚动。是否有解决方法可以使我的“文本”标签上下滚动,或者我需要在toplevel窗口中放置不同的小部件?
filewin = Toplevel(background="white")
scrollbar=Scrollbar(filewin)
scrollbar.pack(side=RIGHT, fill=Y)
yscrollcommand=scrollbar.set
Label(filewin, text=". . .\n \
Acidophilium \n\
Wichlacz,P.L., Unz,R.F., Langworthy,T.A. 1986. Acidiphilium angustum sp. nov. Acidiphilium facilis sp. nov. and Acidiphilium vubrum sp. nov. : \n\
Acidophilic Heterotrophic Bacteria Isolated from Acidic Coal Mine Drainage. Int J Syst Bacteriol 36:197-201. \n\
Acinetobacter \n\
Bouvet,P.J.M., Grimont,P.A.D. 1986. Taxonomy of the Genus Acinetobacter with the Recognition of Acinetobacter baumannii sp. nov. Acinetobacter haemolyticus sp. \n\
nov. Acinetobacter johnsonii sp. nov. and Acinetobacter junii sp. nov. and Emended Descriptions of Acinetobacter calcoaceticus and Acinetobacter lwofii. \n\
Int J Syst Bacteriol 36:228-240.",
justify=LEFT, background="white", foreground="black", wraplength=1000).pack()
filewin.title("Matrix References")