Text yazdığım herşeyin büyük harf olarak gözükmesini istiyorum ama Entry de çalışan ‘trace’ bunda çalışmıyor ve internette cevabı bulamadım.Nasıl çözebilirim acaba durumu?
Aşağıdaki kodları bir inceleyin isterseniz:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import tkinter as tk
import threading
root = tk.Tk()
text = tk.Text(root)
text.pack()
def f():
while True:
string = text.get("1.0", text.index("insert"))
row = string.count("\n") + 1
column = text.index("insert").split(".")[1]
for i in string:
if i.islower():
text.delete(f"{row}.{int(column) - 1}")
text.insert(f"{row}.{column}", i.upper())
t1 = threading.Thread(target=f)
t1.daemon = True
t1.start()
t2 = threading.Thread(target=root.mainloop)
t2.run()
1 Beğeni