pygtk - clearing newline char from gtk.Textbuffer -
I have a gtk.TextBuffer that should be cleared after entering the same number of chat programs as input box . I'm just setting buffer back in empty string. However, the new line given from the entry is not removed, and during the next input, a blank line ends up on the cursor. Moving the cursor to the first gtk.Iter does not help. By default, The handler is said before. You can change the "Gobject.connect ()"
"gobject.connect_after ()"
.
def inserttext_cb (text_buffer, position, text, lenght) is required to use: if text == '\ n': Text_buffer.set_text ('') text_view = gtk.TextView ( ) Text_view.get_buffer () Connect_after ('dot-text', insert_text_cb)
Comments
Post a Comment