如何為某些符號設定特定顏色,例如,#等'例如,如果我輸入“ ”,它的顏色應該是藍色,其他保持不變。
typedecker 先生,我正在系結你的功能,但這不起作用
from tkinter import*
root = Tk()
def check_for_symbols(symbol_dict) :
for i in symbol_dict :
text.tag_remove(i, '1.0', END)
pos = 1.0
while 1:
pos = text.search(i, pos, regexp = True, stopindex = END)
if not pos:
break
last_pos = '%s
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/437641.html
