I'm found some seriously strange behavior with a TextView inside a
Paned() widget. I believe this is most likely a bug in the underlying
gtk, but I'm not sure which component is to blame and so I'd be
grateful for any thoughts on where the underlying problem is so I can
find/file a useful bug report.
Note: this isn't a huge problem since I can fix it by changing the
scroll policy of the TextView widget. Nonetheless, it seems like it
shouldn't be happening.
Wrapping text in a TextView in a ScrolledWindow with a
no-horizontal-scroll policy inside an HPaned results in a rapidly
expanding window when the Paned widget's set_position method is
# set up scrolled window
# Changing POLICY_NEVER to POLICY_AUTOMATIC will make the
# strange behavior go away.
blob='This is some text to fill our buffer. ' * 10
blob = '%s\n'%blob * 75
# add something to both sides
hp.add1(gtk.Label('This is absurd and very silly'))
def set_pos (*args):
# connect our button to demonstrate
Dnia 03-06-2005, pią o godzinie 22:14 -0400, Thomas Mills Hinkle
> I'm found some seriously strange behavior with a TextView inside a
> Paned() widget. I believe this is most likely a bug in the underlying
> gtk, but I'm not sure which component is to blame and so I'd be
> grateful for any thoughts on where the underlying problem is so I can
> find/file a useful bug report.
>From quick look, it looks like bug in wordwrapping code interacting with
size request logic. Try grabbing gutter manually and slowly moving it to
the left -- you'll notice that it occurs every time textview gains
enough horizontal space to try re-wrapping lines. Because (with gutter
enough to the left) this will be reason for resize itself, you get the
behaviour you're observing -- textview rapidly expanding horizontally.
You can however stop it by moving gutter back to the right, thus
shutting the supply of horizontal space.
This indeed looks like genuine bug, please report to bugzilla.