Home > Back-end >  How to create minmap in like other modern code editor in python tkinter?
How to create minmap in like other modern code editor in python tkinter?

Time:04-17

I am creating a code editor and I want to create a minimap like other code editor have but I have no idea about how to create it in python tkinter

I want to create minimap like in this image enter image description here

this is what I am creating:- enter image description here

CodePudding user response:

Text widgets can have peers - two or more widgets that share the same content. Just give the second text widget a tiny font.

Unfortunately, tkinter's support of peer widgets isn't complete, so it's best to create a helper class to do most of the work. I provided an example in enter image description here

  • Related