Under the last line you added, add this: def FontHelvetica(): global text nfig(font="Helvetica") def FontCourier(): global text nfig(font="Courier") font=Menubutton(root, text="Font") id() nu=Menu(font, tearoff=0) font=nu helvetica=IntVar() courier=IntVar() _checkbutton(label="Courier", variable=courier, command=FontCourier) _checkbutton(label="Helvetica", variable=helvetica, command=FontHelvetica)Ĭongratulations! You have finished a very simple text editor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |