0

我最近重新访问了我的一个较旧的 GUI 项目,并决定它的文本小部件需要一个垂直滚动条,因为输出通常很长。我自己找不到这个,想知道是否可以得到一些帮助。这是必要的代码:

from Tkinter import *

class Application(Frame):
    def __init__(self,master):
        Frame.__init__(self,master)
        self.grid()
        self.widget()
    def widget(self):
        self.results_plain_label = Label(self,
                                         text = "Deciphered Message")
        self.results_plain_label.grid(row = 13, column =5, pady = 5 )
        self.results_plain_text = Text (self, width = 100, height = 6,
        wrap = WORD, font ("Times New Roman", ))
        self.results_plain_text.grid(row = 14, column = 5, pady = 5, sticky = W)

Mainloop initialization stuff

那么,我将如何scroll-barresults_plain_text文本框中添加一个?

4

0 回答 0