Is it possible to use a custom object instead of String inside a Tkinter Text Widget (python)?
问题 I'm trying to create a text editor that will manipulate a string like object. Ideally I would like to subclass Tkinter's Text Widget or some other Gui module to allow me to substitute this custom object instead of using strings. I understand how to create the object itself (which essentially just tags every word with meta-data), but not how to manipulate the rendered object as text while retaining its other attributes. Eg. The text editor imports a file that contains "Hello World". Upon