[pygtk] ScrolledWindow & TextView Problem.

Dominic Salemno d.salemno at gmail.com
Thu Aug 28 00:20:06 WST 2008


Greetings,

Here resides my issue! I have a ScrolledWindow being utilized inside my
application. Contained inside of the ScrolledWindow is a TextView widget.
Last, but certainly not least, is a TextBuffer associated with the TextView
widget. Simple... correct? I thought as much! The main purpose of the
application is to provide a scrolling effect anytime new text is inserted.
The window would start scrolling downwards in the event the text started
scrolling outside the viewable area. I implemented this technique inside the
pygtk FAQ:

http://faq.pygtk.org/index.py?req=show&file=faq14.010.htp

The technique is basically explained as so (copied from the entry):

end_iter = text_buffer.get_end_iter()
text_buffer.insert(end_iter, text)
text_view.scroll_to_mark(text_buffer.get_insert(), 0)

This works fine until one touches the viewable area in where the text
resides. The TextView properities are as follows:

set_editable(False)
set_cursor_visible(False)

Therefore, no one is actually editing anything inside this area. I was
simply trying to copy text that is populating the area and paste it into
another application. As soon as I try this... new text still begins to
populate the area. The scrolling effect just instantly stops working!

This effect is an absolute necessity for this type of application!

Suggestions?

Thank you!

Sincerely, Dominic Salemno.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20080827/39242ee9/attachment.htm 


More information about the pygtk mailing list