import PySimpleGUI as sg
def jiancha1():#定义检查函数,并且向window1输出富文本内容
#window1['-MLINE1-'].update(out)
window1['-MLINE1-'].print("检查完成第一步",text_color='red',background_color='yellow',end="")#输出富文本内容,并且不会自动换行,富文本作用范围在结束符之后
window1['-MLINE1-'].print("\n检查完成第二步",text_color='red',background_color='white',font=('宋体', 20,'bold overstrike'),end="")#字体作用在结束符后面,不会自动换行
#window1['-MLINE1-'].update(out)
#sg.Print("检查完成第三步",text_color='red')#调试窗口弹出
#详细的字体设置
'''
Font
Specifies the font family, size, and style. Font families on Windows include: * Arial * Courier * Comic, * Fixedsys * Times * Verdana * Helvetica (the default I think)
The fonts will vary from system to system, however, Tk 8.0 automatically maps Courier, Helvetica and Time
pysimplegui实现类似richtextbox的功能-富文本功能
于 2022-02-05 09:01:06 首次发布