Ubuntuud
November 29th, 2006, 03:30 PM
Hi,
I'm creating a program with pygtk.
It's my first serious one. But I'm running into some problems with textview. I have the following code.
sw = gtk.ScrolledWindow();
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC);
textview = gtk.TextView();
sw.add(textview);
Now I would like to access the text in the textview to save it.
And to open saved files.
How can I do that? I think I have to do something with textbuffers, but I don't know what.
Could anyone give an example? Thanks in advance!
I'm creating a program with pygtk.
It's my first serious one. But I'm running into some problems with textview. I have the following code.
sw = gtk.ScrolledWindow();
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC);
textview = gtk.TextView();
sw.add(textview);
Now I would like to access the text in the textview to save it.
And to open saved files.
How can I do that? I think I have to do something with textbuffers, but I don't know what.
Could anyone give an example? Thanks in advance!