« Return to Thread: Scrollable image widget

Re: Scrollable image widget

by Sayamindu Dasgupta-2 :: Rate this Message:

Reply to Author | View in Thread

Hello,

On Fri, Jul 3, 2009 at 8:50 PM, Johannes Bauer<dfnsonfsduifb@...> 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]
_______________________________________________
pygtk mailing list   pygtk@...
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

 « Return to Thread: Scrollable image widget