我正在嘗試為我的文本小部件創建一個滾動條,但是,我似乎無法 grid() 滾動條,因此滾動條沒有出現在文本小部件上。忽略變量 Quote 中的內容,它只是測試數據。EventScrollBar= tk.Scrollbar(EventChoice)EventText=tk.Text(EventChoice,height=25,width=50)EventText.grid(row=3,column=1,columnspan=5)EventScrollBar.config(command=EventText.yview)EventText.config(yscrollcommand=EventScrollBar.set)Quote=("""...wd""")EventText.insert(tk.END,Quote)EventText.config(state=tk.DISABLED)
如何使用 .grid 方法將滾動條添加到 tkinter Text Widget
慕工程0101907
2021-08-17 18:50:42