PyGtk,TextView 中的隐藏字符是什么?
PyGtk, What are The Hidden Chars in TextView?
我在使用 Gtk TextBuffer
对象的 get_text(start_iter, end_iter, include_hidden_chars)
方法时遇到问题。我不明白 include_hidden_chars arg 它是什么以及它有什么作用?
你能给出一个关于 Gtk TextView 中隐藏字符的简单例子吗?
谢谢
您可以使用将 "invisible" 属性 设置为 true [1]
的文本标记在文本缓冲区中设置一些不可见的文本
当您使用缓冲区的 get_text 方法时,您可以决定该方法是否应该或不应该在 return 值
中包含隐藏文本
[1] https://developer.gnome.org/gtk3/stable/GtkTextTag.html#GtkTextTag--invisible
我在使用 Gtk TextBuffer
对象的 get_text(start_iter, end_iter, include_hidden_chars)
方法时遇到问题。我不明白 include_hidden_chars arg 它是什么以及它有什么作用?
你能给出一个关于 Gtk TextView 中隐藏字符的简单例子吗?
谢谢
您可以使用将 "invisible" 属性 设置为 true [1]
的文本标记在文本缓冲区中设置一些不可见的文本当您使用缓冲区的 get_text 方法时,您可以决定该方法是否应该或不应该在 return 值
中包含隐藏文本[1] https://developer.gnome.org/gtk3/stable/GtkTextTag.html#GtkTextTag--invisible