[pygtk] ScrolledWindow scrollbars

Scott Horowitz stonecrest at gmail.com
Wed May 17 12:52:12 WST 2006


I'm having trouble with the automatic policy for a ScrolledWindow's
scrollbars. I have a ScrolledWindow with a Viewport inside of it and a
gtk.Image inside of that. When the size of the ScrolledWindow is
fullscreen (1024x768) and I try to place an image inside of dimentions
ScrolledWndow.allocation.width and ScrolledWindow.allocation.height,
scrollbars appear. The image is the same size as the ScrolledWindow,
so you'd think that no scrollbars would be present.

I then tried setting the image to be of size:
ScrolledWindow.allocation.width -
ScrolledWindow.style_get_property('scrollbar-spacing')
and
ScrolledWindow.allocation.height -
ScrolledWindow.style_get_property('scrollbar-spacing')

But with some gtk themes, scrollbars may still show up. For example,
in my current theme, the vertical scrollbar shows up. In clearlooks,
no scrollbars. In some themes, both.

Maybe I am just not understanding how the automatic scrollbar policy
works and what impact the gtk theme has on it. Can anyone shed some
light?

Thanks,
Scott


More information about the pygtk mailing list