How to enable folding on xml

Topics: Developer Forum
Jun 17, 2011 at 6:01 PM


I'm using ScintillaNet (thanks!!) for a simple but specialised XML file editor. I have got most things working fine, but am stumped by one item: I want xml content to be displayed with fold/unfold marks corresponding to the content depth .. i.e. a line with <stuff> on it would have a fold-mark.

The demo editor Scide does this automatically when you load an Xml file, but my editor doesn't, though it does syntax-highlight Xml properly. I wondered if it was something to do with making a margin visible, but I can't see anything about that in the docs, and Scide doesn't seem to do anything specific that way.

How can I enable auto-folding?

A few general comments:

  • ScintillaNet is really good - thanks very much - but why has there been no official release of 3.x or 4.x?
  • Why is Scide/ScintillaNet still using v1.7 of Scintilla.dll - is there a problem with later versions?
  • It would be good to see an official interface to set a specific editor font for all text, without having to implement a whole styling UI. My current solution involves a for-loop setting all Style[i].Font properties, but this seems like a huge hack to me.