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, "Gobject.connect ()"

The handler is said before. You can change the "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

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -