Search code examples
pygtk

PyGtk, What are The Hidden Chars in TextView?


i meet a problem when i used get_text(start_iter, end_iter, include_hidden_chars) method of Gtk TextBuffer object. i didn't understand include_hidden_chars arg what it is and what it does? can you give simple example about hidden chars in Gtk TextView?

Thanks


Solution

  • You can set some invisible text in the text buffer by using a text mark that sets the "invisible" property to true [1]

    When you use the get_text method of the buffer you can decide if the method should or shouldn't include the hidden text in the return value

    [1] https://developer.gnome.org/gtk3/stable/GtkTextTag.html#GtkTextTag--invisible