Quick question, What is the difference between INSERT and CURRENT? I am using Tkinter text area to display text. My question deals with the insert function, there are 4 options that I am aware of: INSERT, CURRENT, END and raw values.
When I use the INSERT parameter, sometimes the input text would be placed in between existing text rather at the end .
If I use the CURRENT parameter, sometimes the input text will appear at the beginning of the text field.
When I use the END parameter (self explanatory), the input text appears at the end how I prefer it
CodePudding user response:
In short, insert
represents the insertion cursor (where text will be inserted via the keyboard), and current
represents the character closest to the mouse.
From the official tcl/tk documentation, upon which tkinter is built:
Two marks have special significance. First, the mark insert is associated with the insertion cursor .... Second, the mark current is associated with the character closest to the mouse and is adjusted automatically to track the mouse position and any changes to the text in the widget (one exception: current is not updated in response to mouse motions if a mouse button is down; the update will be deferred until all mouse buttons have been released).