texteditor.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:repo 作者: austinHeisleyCook 项目源码 文件源码
def __init__(self, frame):
        frame = Frame()
        frame.pack()
        root.title("pyeditor")
        ttk.Style().configure("Tframe", padding=10, width="10", relief="raised",  background="green")
        ttk.Style().configure("TButton", padding=10, relief="flat", background="red", foreground="red")
        self.fileName = StringVar()
        self.filename = ttk.Label(text="filename")
        self.filename.pack(fill="both")
        self.filen = ttk.Entry(textvariable=self.fileName, width="20")
        self.filen.pack(side="top")
        self.contentdisplay = ttk.Label(text="contents")
        self.contentdisplay.pack(fill="both", padx=19)
        self.contents = Text()
        self.contents.pack(fill="both")
        self.openfile = ttk.Button(text="open", command=self.fileopen)
        self.openfile.pack(side="left")
        self.save = ttk.Button(text="add content", command=self.save)
        self.save.pack(side="left")
        self.fullsave = ttk.Button(text="save", command=self.overwrite)
        self.fullsave.pack(side="left")
        self.Newfile = ttk.Button(text="new file", command=self.new)
        self.Newfile.pack(side="left")
        self.cleartext = ttk.Button(text="clear txt", command=self.clearfile)
        self.cleartext.pack(side="left")
        self.Speak = ttk.Button(text="speak text", command=self.textSpeak)
        self.Speak.pack(side="left")
        self.About = ttk.Button(text="about me", command=self.about)
        self.About.pack(side="left")
        self.Copy = ttk.Button(text="Copy text", command=self.copytext)
        self.Copy.pack(side="left")
        self.Copy = ttk.Button(text="Paste text", command=self.Pastetext)
        self.Copy.pack(side="left")
        self.webview = ttk.Button(text="web view", command=self.webview)
        self.webview.pack(side="left")
        self.search = ttk.Button(text="search", command=self.searchit)
        self.search.pack(side="left")
        self.Exit = ttk.Button(text="exit", command=self.Exitprogram)
        self.Exit.pack(side="left")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号