[pygtk] GTK_WRAP_CHAR broken?

joystick joystick2020 at gmail.com
Wed Nov 19 22:28:50 WST 2008


Hi all,

I recently coded an application that uses pygtk to build its main gui
and I have the following problem:
I have a Window that, among other things, contains a ScrolledWindow
that contains a HBox that packs two TextView like in the code shown
above:

self.hbox = gtk.HBox(False, 0)
self.hbox.pack_start(self.textview, True, True, 2)
self.hbox.pack_start(self.textview2, True, True, 0)
self.scrolled_win.add_with_viewport(self.hbox)

The two textview have some text in them and have both the following properties:

textview.set_wrap_mode(gtk.WRAP_CHAR)
textview2.set_wrap_mode(gtk.WRAP_CHAR)

Here comes the problem:
when I put text in the textviews (actually just when I create them and
I never edit them again) the left one wraps correctly and keep the
right size (about half of the window) but the right one sometime
doesn't wrap correctly and expand the whole window(or push the left
TextView) until the text that is put in it fits in one or a few more
lines. This happens in every window manager in which I tried the
application: gnome, wmaker, xfce.
I don't want to set a fixed width to the Window object nor to the
TextView(s) and I cannot understand why the wrapping isn't working.
Any ideas or anybody that had the same issue?
Thanks in advance,
joy
-- 
GnuPG key on http://keyserver.veridis.com:11371 KeyID 0x399ED0F6


More information about the pygtk mailing list