Could this be achieved. I ve tried Text Marks but the tags to be applied cant take marks as parameters but only iters.
no problem. you just call a gtk func get_iter_at_mark() or sth like that :) On Sun, 27 Mar 2005 08:51:18 -0500, Saurabh Wagh <[EMAIL PROTECTED]> wrote: > Hey there , > > As posted in a different query, i ve been able to achieve printing the > contents of a list on a textview, one string on a line. > > I am facing another problem. The list that i get is at runtime , from > the server ( as a result of xmlrpc call ) and i am displaying the > contents of the list on a textview using the code : ( variable name > for list is "result" ) > > for text in result: > textbuffer.insert_at_cursor(text+'/n') > > I ve got to make hyperlink for each item ( which points to a different > link ) so i had to use tags for each item. Now, since each link is > different, i ve to identify each click as a distinct click and, > ideally, the code for that could have been : > > iter1 = textbuffer.get_start_iter() > iter2 = textbuffer.get_start_iter() > > for text in result: > textbuffer.insert_at_cursor(text) > iter2.forward_word_end() > textbuffer.apply_tag(tag,iter1,iter2) > iter2 = iter1.forward_line() > iter1 = iter2.copy() > > However this code gives me an error as iters are invalidated if buffer > is modified. I however have to give tags in the same loop as i put > things on buffer as i need to get their identity while making the > links. > > Could this be achieved. I ve tried Text Marks but the tags to be > applied cant take marks as parameters but only iters. > > Can any one help me out with this problem ? > > -- Saurabh > _______________________________________________ > pygtk mailing list pygtk@daa.com.au > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ > -- Nikos Kouremenos | Jabber ID: [EMAIL PROTECTED] | http://members.hellug.gr/nkour _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/