ステートメントのようです: MyText.mark_set(INSERT, 'new index')
Text .insert() メソッドの挿入位置を変更しますが、キーボードで入力されたテキストの挿入位置は変更しません。
他の方法では、.insert() メソッドを使用して CTRL-END キーに相当するものを挿入する方法はありますか
from tkinter import *
def curseur(bidon):
mytext.mark_set(INSERT, END)
root = Tk()
mytext = Text(root)
mytext.pack()
mytext.insert(INSERT, "Clic in other window, then clic back here (line one)\n")
mytext.insert(INSERT, "Type something on the keyboard\n")
mytext.insert(INSERT, "The typed text must go to the end of the widget\n")
mytext.bind("<FocusIn>", curseur)
root.mainloop()
ありがとうございました、