Feature or enhancement
The Tk text widget supports the pathName sync ?-command command? and pathName pendingsync subcommands, which control and report the synchronization of the displayed view with the underlying text when line heights have not yet been computed (for example, for lines that have never been displayed). These obsolete the -update option of pathName count and are accompanied by the <<WidgetViewSync>> virtual event. tkinter currently wraps none of them.
I propose adding two methods to tkinter.Text:
sync(command=None) — with no argument, immediately bring the line metrics up to date by forcing computation of any outdated line heights, returning once they are current. With command, schedule it to be called exactly once as soon as all line heights are up to date (or immediately if there are no pending calculations).
pendingsync() — return True if the line height calculations are not up to date, False otherwise.
Links to previous discussion
This is one of a few Tk text subcommands not yet wrapped by tkinter; edit canundo/edit canredo are tracked separately.
Linked PRs
Feature or enhancement
The Tk text widget supports the
pathName sync ?-command command?andpathName pendingsyncsubcommands, which control and report the synchronization of the displayed view with the underlying text when line heights have not yet been computed (for example, for lines that have never been displayed). These obsolete the-updateoption ofpathName countand are accompanied by the<<WidgetViewSync>>virtual event. tkinter currently wraps none of them.I propose adding two methods to
tkinter.Text:sync(command=None)— with no argument, immediately bring the line metrics up to date by forcing computation of any outdated line heights, returning once they are current. Withcommand, schedule it to be called exactly once as soon as all line heights are up to date (or immediately if there are no pending calculations).pendingsync()— returnTrueif the line height calculations are not up to date,Falseotherwise.Links to previous discussion
This is one of a few Tk text subcommands not yet wrapped by tkinter;
edit canundo/edit canredoare tracked separately.Linked PRs