I want to insert text in a textbuffer at the end ... Im using this: gtk.TextBuffer.insert_at_cursor
gtk.TextBuffer.insert_at_cursor
But if I click on the text, a new cursor appears there ...
How to add text at the end?
Try using gtk.TextBuffer.insert() with gtk.TextBuffer.get_end_iter() , Example:
gtk.TextBuffer.insert()
gtk.TextBuffer.get_end_iter()
# text_buffer is a gtk.TextBuffer end_iter = text_buffer.get_end_iter() text_buffer.insert(end_iter, "The text to insert at the end")
NOTE. After you paste into text_buffer end_iter is invalid, make sure you get a new link to the final iterator when you want to add to the end of the buffer.
text_buffer
end_iter