txt_frm.pack(fill='both', expand=True)
txt_frm.grid_propagate(False)
txt_frm.grid_rowconfigure(0, weight=1)
txt_frm.grid_columnconfigure(0, weight=1)
self.txt = tki.Text(txt_frm, borderwidth=3, relief='sunken')
self.txt.config(font=('consolas', 12), undo=True, wrap='word')
self.txt.grid(row=0, column=0, sticky='nsew', padx=2, pady=2)
scrollb = tki.Scrollbar(txt_frm, command=self.txt.yview)
scrollb.grid(row=0, column=1, sticky='nsew')
self.txt['yscrollcommand'] = scrollb.set
app = App()
app.root.mainloop()
Как прикрепить полосу прокрутки к текстовому виджету?