tags:

views:

137

answers:

1

I am having a problem with GtkSourceView used from Python.

Two major problems: 1) When a user types text into the GtkSourceView, and types past the bottom of the visible text, the GtkSourceView does not autoscroll to the users cursor. This wouldnt be so bad, except: 2) The arrow keys, page up and page down keys, do not cause the GtkSourceView to scroll either.

The mouse scrollbar does work on the GtkSourceView.

Does anyone have knowledge/experience of this?

My code is here http://launchpad.net/kabikaboo

A: 

Ok I just figured this out.

I was adding the GtkSourceView2 into a GtkScrolledWindow. Only, it was adding a ViewPort first via ScrolledWindow.add_with_viewport(). This disables part of the scrolling behavior via keyboard. Instead, use ScrolledWindow.add(), and the ViewPort is skipped and the GtkAdjustments take care of the scrolling!