1

I am looking for help - I am updating my Tkinter wiki (http://sourceforge.net/projects/infolder/) trying to add to it some folding/outline capabilities. For it to work I need to place in the text widget (the main window where all the action happens) some un-deletable symbol indicating folding (e.g. a small triangle image indicating hidden text lines).

Unfortunately I noticed from these Q&A's that undeletable stuff is not easy to create in Tkinter:

How can you mark a portion of a text widget as readonly?

unremovable text in tkinter

As a 2nd option, I could try to show folding levels by a forced indent, so that e.g. if I'm at a one-level deep, the start-of-line is not at column 1 but at column 5...

This is it possible in Tkinter, without too much work?

thanks for any help...

Community
  • 1
  • 1
alessandro
  • 3,838
  • 8
  • 40
  • 59

1 Answers1

1

Your question says that undeleteable regions are "not easy", but you also show they are possible by linking to an answer that shows how. So, what question are you asking?

As for "forced indent", look at the lmargin1 and lmargin2 tag attributes.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
  • yes! That was it... thak you. Undeletable regions I saw that are possible, but I wanted to avoid intercepting commands since my program is really becoming too complex. – alessandro Aug 03 '12 at 07:13