[pygtk] Scrollable image widget

Sayamindu Dasgupta sayamindu at gmail.com
Fri Jul 3 23:50:38 WST 2009


Hello,

On Fri, Jul 3, 2009 at 8:50 PM, Johannes Bauer<dfnsonfsduifb at gmx.de> wrote:
> Hello list,
>
> I want to have an image scrollable (if it exceeds the given space). So I
> tried to put a GtkScrolledWindow around my GtkImage, but this doesn't
> work. When running the application I get:
>
> gtk_scrolled_window_add(): cannot add non scrollable widget use
> gtk_scrolled_window_add_with_viewport() instead
>
> What do I do?
>

You can add your widget to a gtk.Viewport
(http://www.pygtk.org/docs/pygtk/class-gtkviewport.html) and then put
that inside a scrolledwindow.
Also, if you are looking for a somewhat more advanced imageviewer
widget - you can take a look at http://trac.bjourne.webfactional.com/

Thanks,
Sayamindu



-- 
Sayamindu Dasgupta
[http://sayamindu.randomink.org/ramblings]


More information about the pygtk mailing list