用ttkbootstrap做一个文本编辑器,比起原版tkinter更美观,666
首先,需要导入bilibala各种库: (鱿鱼本仁必交蓝,注视久先补鞋了,哈哈哈)
import ttkbootstrap as ttk
from ttkbootstrap.constants import *
from tkinter.filedialog import askopenfilename, asksaveasfilename
import ttkbootstrap.dialogs as ttkdialog
import tkinter.messagebox as tkmessage
创建个窗口:
win = ttk.Window(resizable=(False, False))
win.title('文本编辑器')
来点面板(其实没啥用)和输入框(别pack!!!):
frame = ttk.Frame(win,)
frame.pack()
filename = ttk.StringVar()
entry_file = ttk.Entry(frame, textvariabl