Jan-30-2018, 10:55 PM
Hi guys,
I'm new on this forum.
I registered for despair :(
I have a (maybe little) problem with the Text widget.
When I paste some text from clipboard and the last line leave out of form view, the scroll bar (or text widget) doesn't move on cursor position.
I found this function:
IMPORTFILES_list.bind("<KeyPress>", gotocursor)
and the function:
def gotocursor(event):
IMPORTFILES_list.insert(END, "")
IMPORTFILES_list.see(END)
but every time that I press any key, the function want to go to the cursor.
I would like that this function will be recall only if I paste along text with ctrl + V.
Someone can hel me?
Many thanks
I'm new on this forum.
I registered for despair :(
I have a (maybe little) problem with the Text widget.
When I paste some text from clipboard and the last line leave out of form view, the scroll bar (or text widget) doesn't move on cursor position.
I found this function:
IMPORTFILES_list.bind("<KeyPress>", gotocursor)
and the function:
def gotocursor(event):
IMPORTFILES_list.insert(END, "")
IMPORTFILES_list.see(END)
but every time that I press any key, the function want to go to the cursor.
I would like that this function will be recall only if I paste along text with ctrl + V.
Someone can hel me?
Many thanks