[pygtk] Scrolling with not scrollbars

John Finlay finlay at moeraki.com
Tue Apr 22 05:16:12 WST 2008


Thorsten Wilms wrote:
> On Sun, 2008-04-20 at 14:10 -0700, John Finlay wrote:
>
>   
>> A textview has adjustments built-in so it doesn't need to be put inside 
>> a viewport. Use the set_scroll_adjustments() method to set the 
>> adjustments for the textview.
>>     
>
> Thanks, but I have no luck with this (and no good concept, obviously).
>
> First it confuses me that you can't get an adjustment from the textview,
> you can only set it, which looks to me like guesswork for reasonable
> values.
>
> Then
>    adj = gtk.Adjustment(0.8, 0.0, 1.0, 0.1, 0.1, 0.1)
>    textview.set_scroll_adjustments(None, adj)
>
>   
Try some larger values for the upper and step, etc. These aren't limited 
to 0-1.0. I suspect that the range values is lines and characters.

John


More information about the pygtk mailing list