How can you mark a portion of a text widget as readonly?
The most bullet-proof solution is to intercept the low-level insert and delete commands, and put logic in there to prevent insertions and deletions based on some sort of criteria. For example, you could disallow edits within any range of text that has the tag “readonly”. Here’s an example of this technique. It takes advantage of … Read more