Hello, I've still not given up on inserting formatted text into a buffer on the fly. This is the code I have at the moment. It is a function called each time the user presses an input key, by the "insert-text" event.
def on_text_inserted(self, buffer, iter, text, length, data=None): start = iter.copy() end = iter.copy() for tag in self.tag_list: self.apply_tag(tag, start, end) Where tag_list is a list of gtk.TextTags. This code produces no formatting at all when there are tags in the list. If I move the "start" iter back one position (backward_char()), then the second last character in the buffer is formatted. I cannot move the "end" iter forward at all (end.forward_char() returns FALSE). In this case, self is a gtk.TextBuffer. This almost works, but it doesn't. Has anyone got any suggestions? It seems I cannot get two iters to surround the last character in the buffer. Thanks, ~djc _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/