Hide/show text in GtkTextBuffer/GtkTextView?

I’d like to offer users hide/show capability for selected regions of text. I see how to implement the “hide” part OK, using a GtkTextTag with the “invisible” property set to 1: just apply that tag to the region in question in response to a suitable menu item. I’m not so clear on how to do “show” (undo hide). I guess I need a pixbuf, or perhaps a short piece of boilerplate text, as a visible placeholder, then set a callback for clicking on that to (a) delete the placeholder and (b) remove the hidden tag from the original bit of text. But I’m hazy on the details. Is there a good example of doing this sort of thing somewhere in the GTK-application ecosystem?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.