[ Team LiB ] Previous Section Next Section

Text Widget Undo Mechanism and Other Enhancements

The text widget gained several new features in Tk 8.4:

  • A mechanism for unlimited undoing and redoing of changes was added. (TIP #26) When the new -undo option is set to a Boolean true value, the widget records every insert and delete action on a stack. Default key bindings allow the user to undo and redo changes, and a programmatic interface gives the application full control over the undo and redo stacks. (See "The Undo Mechanism" on page 548.)

  • The text widget generates a <<Modified>> virtual event whenever the contents of the widget changes. (TIP #26)

  • The text widget generates a <<Selection>> virtual event whenever the text selection of the widget changes. (TIP #26)

  • The text widget's delete and get operations now accept multiple ranges, instead of only a single character or range of characters. (TIP #93)

    [ Team LiB ] Previous Section Next Section