Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text changed signal for Text View widget in GTK3

Tags:

python

gtk3

How can I find out when the text has been changed in a text view widget in the GTK3 framework? I think there must be a signal associated with it, but could not find it. For example, there is an ontextchanged signal in qt4, so there should be a similar signal in GTK. I am using Python.

like image 583
Gaurav Sood Avatar asked Feb 02 '12 14:02

Gaurav Sood


1 Answers

Every TextView widget is associated to a TextBuffer object. The signal you are looking for is changed but of the associated text buffer. If you create a TextView without an associated buffer, a default one is created for you and you can retrieve it with textview.get_buffer()

like image 164
mg. Avatar answered Oct 24 '22 09:10

mg.